Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove test_profiler_emit_nvtx case since it is only for CUDA device #1131

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions test/xpu/skip_list_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@
# c10::NotImplementedError
"test_autograd_composite_implicit_and_dispatch_registration_xpu",
"test_autograd_multiple_dispatch_registrations_xpu",
# AttributeError: module 'torch.xpu' has no attribute
# only for CUDA,XPU case is test_profiler_emit_itt
"test_profiler_emit_nvtx_xpu",
# Double and complex datatype matmul is not supported in oneDNN
"test_mv_grad_stride_0_xpu",
Expand All @@ -1114,7 +1114,6 @@
# RuntimeError: Fail to enable Kineto Profiler on XPU due to error code: 200
# https://github.com/intel/torch-xpu-ops/issues/731
"test_profiler",
"test_record_function",
# Sometimes, will raise AssertionError: "Simulate error" does not match "grad can be implicitly created only for scalar outputs"
# https://github.com/intel/torch-xpu-ops/issues/1071
"test_reentrant_parent_error_on_cpu_xpu",
Expand Down
10 changes: 0 additions & 10 deletions test/xpu/test_autograd_xpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,6 @@ def gradcheck_input_output_different_device(self, device):
x = torch.ones((1,), dtype=torch.double, device="cpu", requires_grad=True)
gradcheck(lambda x: x.to("xpu"), (x,))

def profiler_emit_nvtx(self, device):
# This test is not intended to ensure correctness of nvtx ranges.
# That would require something a great deal more complex (you'd have to create a
# profile in a subprocess, open it, and parse the sql somehow).
# This test is merely intended to catch if emit_nvtx breaks on construction.
a = torch.tensor([1, 2, 3], dtype=torch.float32, device=device)
with torch.xpu.profiler.profile():
with emit_nvtx():
a.add(1.0)

def dataparallel_saved_tensors_hooks(self):
def pack(x):
Expand Down Expand Up @@ -606,7 +597,6 @@ def hook(*args, **kwargs):

TestAutogradDeviceType.test_gradcheck_input_output_different_device = gradcheck_input_output_different_device
TestAutogradDeviceType.test_pin_memory = pin_memory
TestAutogradDeviceType.test_profiler_emit_nvtx = profiler_emit_nvtx
TestMultithreadAutograd.test_dataparallel_saved_tensors_hooks = dataparallel_saved_tensors_hooks
TestMultithreadAutograd.test_custom_function_propagates_errors_from_device_thread = custom_function_propagates_errors_from_device_thread
TestAutogradMultipleDispatch.test_autograd_multiple_dispatch_registrations = autograd_multiple_dispatch_registrations
Expand Down
Loading