Skip to content

Commit

Permalink
disable use_cpu test (#1635)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
liligwu authored and q10 committed Mar 15, 2023
1 parent 8616ed7 commit ec2d477
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions fbgemm_gpu/test/jagged_tensor_ops_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,20 @@
from fbgemm_gpu import open_source # noqa: F401

# pyre-ignore[21]
from test_utils import gpu_available, gpu_unavailable, running_on_github
from test_utils import (
gpu_available,
gpu_unavailable,
running_on_github,
TEST_WITH_ROCM,
)
except Exception:
torch.ops.load_library("//deeplearning/fbgemm/fbgemm_gpu:sparse_ops")
torch.ops.load_library("//deeplearning/fbgemm/fbgemm_gpu:sparse_ops_cpu")
from fbgemm_gpu.test.test_utils import (
gpu_available,
gpu_unavailable,
running_on_github,
TEST_WITH_ROCM,
)


Expand Down Expand Up @@ -1466,7 +1472,11 @@ def jagged_index_select_2d_ref(
torch.long,
] # Disable torch.bfloat16 due to large error bound
),
use_cpu=st.booleans() if gpu_available else st.just(True),
use_cpu=st.booleans()
if (gpu_available and not TEST_WITH_ROCM)
else st.just(False)
if (gpu_available and TEST_WITH_ROCM)
else st.just(True),
)
@settings(max_examples=20, deadline=None)
def test_jagged_index_select_2d(
Expand Down

0 comments on commit ec2d477

Please sign in to comment.