fix bug and mac compile

revert-15207-remove_op_handle_lock_and_fix_var
tensor-tang 6 years ago
parent bc0df6a948
commit f3250097bc

@ -12,9 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License. */
// #include <cstring> // for memcpy
// #include <random>
#include <iostream>
#include <random>
#include <string>
#include <vector>
#include "gflags/gflags.h"

@ -49,6 +49,7 @@ inline typename KernelTuples::func_type GetJitCode(
// pool: (KernelKey(type, place), vector<GenCreatorPtr>)
auto& creator_map = JitCodeCreatorPool().Instance().AllCreators();
auto iter = creator_map.find(kkey);
if (iter != creator_map.end()) {
auto& creators = iter->second;
for (auto& cur : creators) {
auto i = dynamic_cast<const JitCodeCreator<Attr>*>(cur.get());
@ -62,6 +63,7 @@ inline typename KernelTuples::func_type GetJitCode(
}
}
}
}
return nullptr;
}

Loading…
Cancel
Save