VariableSpace uses unordered maps as well (#270)

Signed-off-by: raver119 <raver119@gmail.com>
master
raver119 2020-02-24 21:58:23 +03:00 committed by GitHub
parent f0706b21aa
commit 241ed05c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -45,9 +45,9 @@ namespace nd4j {
// stash is NOT cloned // stash is NOT cloned
nd4j::graph::Stash _stash; nd4j::graph::Stash _stash;
std::map<std::pair<int, int>, Variable*> _paired; MAP_IMPL<std::pair<int, int>, Variable*> _paired;
std::map<std::string, Variable*> _symbolic; MAP_IMPL<std::string, Variable*> _symbolic;
std::map<int, Variable*> _variables; MAP_IMPL<int, Variable*> _variables;
std::vector<Variable*> _external; std::vector<Variable*> _external;
std::vector<Variable*> _internal; std::vector<Variable*> _internal;
@ -61,7 +61,7 @@ namespace nd4j {
std::mutex _varmap; std::mutex _varmap;
std::map<int, nd4j::graph::Variable*> _temporary; MAP_IMPL<int, nd4j::graph::Variable*> _temporary;
std::vector<nd4j::graph::Variable*> *_handles; std::vector<nd4j::graph::Variable*> *_handles;

View File

@ -111,7 +111,7 @@ TEST_F(PlaygroundTests, test_bert_1) {
graph->getVariableSpace()->putVariable(86,0, u); graph->getVariableSpace()->putVariable(86,0, u);
graph->getVariableSpace()->putVariable(87,0, v); graph->getVariableSpace()->putVariable(87,0, v);
/*
// validating graph now // validating graph now
auto status = GraphExecutioner::execute(graph); auto status = GraphExecutioner::execute(graph);
ASSERT_EQ(Status::OK(), status); ASSERT_EQ(Status::OK(), status);
@ -119,8 +119,8 @@ TEST_F(PlaygroundTests, test_bert_1) {
auto array = graph->getVariableSpace()->getVariable(198)->getNDArray(); auto array = graph->getVariableSpace()->getVariable(198)->getNDArray();
ASSERT_EQ(z, *array); ASSERT_EQ(z, *array);
*/
/*
nd4j::Environment::getInstance()->setProfiling(true); nd4j::Environment::getInstance()->setProfiling(true);
auto profile = GraphProfilingHelper::profile(graph, 1); auto profile = GraphProfilingHelper::profile(graph, 1);
@ -128,7 +128,7 @@ TEST_F(PlaygroundTests, test_bert_1) {
nd4j::Environment::getInstance()->setProfiling(false); nd4j::Environment::getInstance()->setProfiling(false);
delete profile; delete profile;
*/
/* /*
std::vector<Nd4jLong> values; std::vector<Nd4jLong> values;