Skip to content

Commit 30833fa

Browse files
liligwufacebook-github-bot
authored andcommitted
disable use_cpu test (#1635)
Summary: This PR addresses the issue #1636 akin to https://github.com/pytorch/FBGEMM/blob/8616ed701015f8b9e4c2825ce592b204b4cfaf28/fbgemm_gpu/test/split_table_batched_embeddings_test.py#L1009 Pull Request resolved: #1635 Reviewed By: shintaro-iwasaki Differential Revision: D44033725 Pulled By: q10 fbshipit-source-id: 49f28fc2f1c20948a42728eebf3defc5195baa5d
1 parent 75dd112 commit 30833fa

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

fbgemm_gpu/test/jagged_tensor_ops_test.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,20 @@
2020
from fbgemm_gpu import open_source # noqa: F401
2121

2222
# 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+
)
2429
except Exception:
2530
torch.ops.load_library("//deeplearning/fbgemm/fbgemm_gpu:sparse_ops")
2631
torch.ops.load_library("//deeplearning/fbgemm/fbgemm_gpu:sparse_ops_cpu")
2732
from fbgemm_gpu.test.test_utils import (
2833
gpu_available,
2934
gpu_unavailable,
3035
running_on_github,
36+
TEST_WITH_ROCM,
3137
)
3238

3339

@@ -1466,7 +1472,11 @@ def jagged_index_select_2d_ref(
14661472
torch.long,
14671473
] # Disable torch.bfloat16 due to large error bound
14681474
),
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),
14701480
)
14711481
@settings(max_examples=20, deadline=None)
14721482
def test_jagged_index_select_2d(

0 commit comments

Comments
 (0)