Skip to content

Commit

Permalink
build: fix -Wunused-function warning (#554)
Browse files Browse the repository at this point in the history
PyTorch enforced unused-function and unused-variable compilation options
recently. It leads to torch-xpu-ops building failure with -Werror.
Fixing: pytorch/pytorch#130084

Signed-off-by: Feng Yuan <[email protected]>
  • Loading branch information
fengyuan14 authored Jul 10, 2024
1 parent 4db0b0c commit 1dcaf3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/ATen/native/xpu/XPUFallback.template
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ static void xpu_lazy_registration_or_error_fallback(
}
}

static void xpu_force_fallback(
const c10::OperatorHandle& op,
torch::jit::Stack* stack) {}

TORCH_LIBRARY_IMPL(_, XPU, m) {
static const char* enable_xpu_fallback =
getenv("PYTORCH_ENABLE_XPU_FALLBACK");
Expand Down
5 changes: 5 additions & 0 deletions test/xpu/run_test_with_skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,11 @@ def launch_test(test_case, skip_list=None, exe_list=None):
# https://github.com/intel/torch-xpu-ops/issues/461
"test_index_put_src_datatype_xpu_float8_e5m2",
"test_index_put_src_datatype_xpu_float8_e4m3fn",

# Regression after PyTorch update
# http://github.com/intel/torch-xpu-ops/issues/549
# IndexError: tensors used as indices must be long, byte or bool tensors.
"test_index_ind_dtype_xpu",
)
res += launch_test("test_indexing_xpu.py", skip_list)

Expand Down

0 comments on commit 1dcaf3e

Please sign in to comment.