Skip to content

Commit

Permalink
roll back to unordered map
Browse files Browse the repository at this point in the history
  • Loading branch information
VertexC committed Jul 3, 2021
1 parent 22c0540 commit 409da78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oneflow/core/framework/random_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ limitations under the License.
#include "oneflow/core/device/device_context.h"
#include <fcntl.h>
#include <unistd.h>
#include <unordered_map>

#ifdef WITH_CUDA
#include <curand.h>
Expand Down Expand Up @@ -117,7 +118,7 @@ class AutoGeneratorImpl : public GeneratorImpl {
}

private:
std::map<DeviceType, std::shared_ptr<GeneratorImpl>> generators_;
std::unordered_map<DeviceType, std::shared_ptr<GeneratorImpl>, std::hash<int>> generators_;
};

class Generator final {
Expand Down

0 comments on commit 409da78

Please sign in to comment.