Merge pull request #361 from scchan/load_startup2

load the GPU objects and setup the function symbol map on startup
此提交包含在:
Maneesh Gupta
2018-02-20 12:27:41 +05:30
提交者 GitHub
當前提交 7c2232d4e7
+12
查看文件
@@ -490,4 +490,16 @@ namespace hip_impl
return executable;
}
// To force HIP to load the kernels and to setup the function
// symbol map on program startup
class startup_kernel_loader {
private:
startup_kernel_loader() { functions(); }
startup_kernel_loader(const startup_kernel_loader&) = delete;
startup_kernel_loader& operator= (const startup_kernel_loader&) = delete;
static startup_kernel_loader skl;
};
startup_kernel_loader startup_kernel_loader::skl;
} // Namespace hip_impl.