File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Owner(s): ["module: intel"]
2
+ import os
3
+
4
+ import torch
5
+ from torch .testing ._internal .common_utils import TestCase
6
+
7
+
8
+ class TestXpuOpsHeader (TestCase ):
9
+ def test_xpu_ops_header (self ):
10
+ include_dir = os .path .join (os .path .dirname (torch .__file__ ), "include" )
11
+ aten_ops_dir = os .path .join (include_dir , "ATen/ops" )
12
+ self .assertTrue (
13
+ os .path .exists (os .path .join (aten_ops_dir , "cat_xpu_dispatch.h" ))
14
+ )
15
+ self .assertTrue (
16
+ os .path .exists (os .path .join (aten_ops_dir , "index_fill_xpu_dispatch.h" ))
17
+ )
18
+ self .assertTrue (os .path .exists (os .path .join (aten_ops_dir , "col2im_native.h" )))
19
+ with open (os .path .join (aten_ops_dir , "col2im_native.h" )) as fr :
20
+ text = fr .read ()
21
+ self .assertTrue ("col2im_xpu" in text )
You can’t perform that action at this time.
0 commit comments