Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit ed9cd73

Browse files
committed
misc(builder): remove unneeded changes for unsupported platforms
1 parent 16ed117 commit ed9cd73

4 files changed

Lines changed: 1 addition & 40 deletions

File tree

build2cmake/src/templates/metal/preamble.cmake

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,3 @@ add_compile_definitions(METAL_KERNEL)
2929

3030
# Initialize list for Metal shader sources
3131
set(ALL_METAL_SOURCES)
32-
33-
# Generate standardized build name
34-
run_python(TORCH_VERSION "import torch; print(torch.__version__.split('+')[0])" "Failed to get Torch version")
35-
run_python(CXX11_ABI_VALUE "import torch; print('TRUE' if torch._C._GLIBCXX_USE_CXX11_ABI else 'FALSE')" "Failed to get CXX11 ABI")
36-
cmake_host_system_information(RESULT HOST_ARCH QUERY OS_PLATFORM)
37-
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
38-
set(SYSTEM_STRING "${HOST_ARCH}-darwin")
39-
else()
40-
message(FATAL_ERROR "Metal is only supported on macOS/Darwin")
41-
endif()
42-
43-
# Metal doesn't have a version - it's tied to the OS
44-
generate_build_name(BUILD_VARIANT_NAME "${TORCH_VERSION}" ${CXX11_ABI_VALUE} "metal" "0" "${SYSTEM_STRING}")

build2cmake/src/templates/metal/torch-extension.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,3 @@ define_gpu_extension_target(
1515
if(ALL_METAL_SOURCES)
1616
compile_metal_shaders({{ ops_name }} "${ALL_METAL_SOURCES}")
1717
endif()
18-
19-
# Add kernels_install target for huggingface/kernels library layout
20-
add_kernels_install_target({{ ops_name }} "{{ name }}" "${BUILD_VARIANT_NAME}")
21-
22-
# Add local_install target for local development with get_local_kernel()
23-
add_local_install_target({{ ops_name }} "{{ name }}" "${BUILD_VARIANT_NAME}")

build2cmake/src/templates/xpu/preamble.cmake

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,3 @@ add_compile_definitions(USE_XPU)
5858
set(sycl_link_flags "-fsycl;--offload-compress;-fsycl-targets=spir64_gen,spir64;-Xs;-device pvc,xe-lpg,ats-m150 -options ' -cl-intel-enable-auto-large-GRF-mode -cl-poison-unsupported-fp64-kernels -cl-intel-greater-than-4GB-buffer-required';")
5959
set(sycl_flags "-fsycl;-fhonor-nans;-fhonor-infinities;-fno-associative-math;-fno-approx-func;-fno-sycl-instrument-device-code;--offload-compress;-fsycl-targets=spir64_gen,spir64;")
6060
message(STATUS "Configuring for Intel XPU backend using SYCL")
61-
62-
# Generate standardized build name
63-
run_python(TORCH_VERSION "import torch; print(torch.__version__.split('+')[0])" "Failed to get Torch version")
64-
run_python(CXX11_ABI_VALUE "import torch; print('TRUE' if torch._C._GLIBCXX_USE_CXX11_ABI else 'FALSE')" "Failed to get CXX11 ABI")
65-
cmake_host_system_information(RESULT HOST_ARCH QUERY OS_PLATFORM)
66-
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
67-
set(SYSTEM_STRING "${HOST_ARCH}-linux")
68-
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
69-
set(SYSTEM_STRING "${HOST_ARCH}-windows")
70-
else()
71-
set(SYSTEM_STRING "${HOST_ARCH}-${CMAKE_SYSTEM_NAME}")
72-
endif()
73-
74-
generate_build_name(BUILD_VARIANT_NAME "${TORCH_VERSION}" ${CXX11_ABI_VALUE} "xpu" "${DPCPP_VERSION}" "${SYSTEM_STRING}")

build2cmake/src/templates/xpu/torch-extension.cmake

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,4 @@ define_gpu_extension_target(
1010

1111
# Add XPU/SYCL specific linker flags
1212
target_link_options({{ ops_name }} PRIVATE ${sycl_link_flags})
13-
target_link_libraries({{ ops_name }} PRIVATE dnnl)
14-
15-
# Add kernels_install target for huggingface/kernels library layout
16-
add_kernels_install_target({{ ops_name }} "{{ name }}" "${BUILD_VARIANT_NAME}")
17-
18-
# Add local_install target for local development with get_local_kernel()
19-
add_local_install_target({{ ops_name }} "{{ name }}" "${BUILD_VARIANT_NAME}")
13+
target_link_libraries({{ ops_name }} PRIVATE dnnl)

0 commit comments

Comments
 (0)