File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 20
20
from fbgemm_gpu import open_source # noqa: F401
21
21
22
22
# pyre-ignore[21]
23
- from test_utils import gpu_available , gpu_unavailable , running_on_github
23
+ from test_utils import (
24
+ gpu_available ,
25
+ gpu_unavailable ,
26
+ running_on_github ,
27
+ TEST_WITH_ROCM ,
28
+ )
24
29
except Exception :
25
30
torch .ops .load_library ("//deeplearning/fbgemm/fbgemm_gpu:sparse_ops" )
26
31
torch .ops .load_library ("//deeplearning/fbgemm/fbgemm_gpu:sparse_ops_cpu" )
27
32
from fbgemm_gpu .test .test_utils import (
28
33
gpu_available ,
29
34
gpu_unavailable ,
30
35
running_on_github ,
36
+ TEST_WITH_ROCM ,
31
37
)
32
38
33
39
@@ -1466,7 +1472,11 @@ def jagged_index_select_2d_ref(
1466
1472
torch .long ,
1467
1473
] # Disable torch.bfloat16 due to large error bound
1468
1474
),
1469
- use_cpu = st .booleans () if gpu_available else st .just (True ),
1475
+ use_cpu = st .booleans ()
1476
+ if (gpu_available and not TEST_WITH_ROCM )
1477
+ else st .just (False )
1478
+ if (gpu_available and TEST_WITH_ROCM )
1479
+ else st .just (True ),
1470
1480
)
1471
1481
@settings (max_examples = 20 , deadline = None )
1472
1482
def test_jagged_index_select_2d (
You can’t perform that action at this time.
0 commit comments