• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <ATen/native/mkldnn/xpu/detail/oneDNNContext.h>
2 #include <ATen/native/mkldnn/xpu/detail/Utils.h>
3 
4 /* *
5  * Do NOT put any kernels or call any device binaries here!
6  * Only maintain oneDNN runtime states in this file.
7  * */
8 namespace at::native::onednn {
9 
10 using namespace dnnl;
11 
Instance()12 GpuEngineManager& GpuEngineManager::Instance() {
13   static GpuEngineManager myInstance;
14   return myInstance;
15 }
16 
Instance()17 GpuStreamManager& GpuStreamManager::Instance() {
18   static thread_local GpuStreamManager myInstance;
19   return myInstance;
20 }
21 
set_onednn_verbose(int level)22 bool set_onednn_verbose(int level) {
23   dnnl::status rs = dnnl::set_verbose(level);
24   return rs == dnnl::status::success;
25 }
26 
27 } // namespace at::native::onednn
28