提交 ed64f0f6 编写于 作者: M Megvii Engine Team

feat(jit/opencl): enable base jit when enable OpenCL

GitOrigin-RevId: a2d6d263005b22423cccf9614f9ded22a1ed8f4e
上级 d9441c27
...@@ -53,9 +53,11 @@ bool ExecutableHelper::keep_interm() { ...@@ -53,9 +53,11 @@ bool ExecutableHelper::keep_interm() {
return ret; return ret;
} }
namespace { //! now only cuda/halide jit depends on ExecutableHelperImpl
//! FIXME: imp ExecutableHelperImpl support android if later need
#if defined(__linux__) && !defined(__ANDROID__)
#ifdef __linux__ namespace {
class ExecutableHelperImpl final : public ExecutableHelper { class ExecutableHelperImpl final : public ExecutableHelper {
bool m_workdir_need_rm = false; bool m_workdir_need_rm = false;
...@@ -218,8 +220,6 @@ public: ...@@ -218,8 +220,6 @@ public:
} }
}; };
#endif // __linux__
} // anonymous namespace } // anonymous namespace
void ExecutableHelper::write_file(const std::string& name, const std::string& data) { void ExecutableHelper::write_file(const std::string& name, const std::string& data) {
...@@ -243,6 +243,7 @@ ExecutableHelper& ::ExecutableHelper::get() { ...@@ -243,6 +243,7 @@ ExecutableHelper& ::ExecutableHelper::get() {
static ExecutableHelperImpl inst; static ExecutableHelperImpl inst;
return inst; return inst;
} }
#endif
std::string jit::next_kernel_name() { std::string jit::next_kernel_name() {
static std::atomic_uint_fast64_t cnt; static std::atomic_uint_fast64_t cnt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册