Skip to content

Commit b50a69c

Browse files
ZzEeKkAaDiptorup Deb
authored andcommitted
Remove atomics emulation and spirv-tools from setup.py & environment
1 parent 491adac commit b50a69c

File tree

6 files changed

+2
-236
lines changed

6 files changed

+2
-236
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ RUN \
199199
--mount=type=bind,target=/opt/toolkit,source=/opt/toolkit,from=toolkit-dist \
200200
export http_proxy=$http_proxy https_proxy=$https_proxy \
201201
&& apt-get update && apt-get install -y \
202-
spirv-tools spirv-headers \
202+
spirv-headers \
203203
rsync \
204204
&& rm -rf /var/lib/apt/lists/* \
205205
&& rsync -a /opt/toolkit/bin/ /usr/local/bin/ \

conda-recipe/run_test.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@ unset ONEAPI_DEVICE_SELECTOR
55

66
for selector in $(python -c "import dpctl; print(\" \".join([dev.backend.name+\":\"+dev.device_type.name for dev in dpctl.get_devices() if dev.device_type.name in [\"cpu\",\"gpu\"]]))")
77
do
8-
export "ONEAPI_DEVICE_SELECTOR=$selector"
9-
unset NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
10-
8+
ONEAPI_DEVICE_SELECTOR=$selector \
119
pytest -q -ra --disable-warnings --pyargs numba_dpex -vv
12-
13-
export NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
14-
15-
pytest -q -ra --disable-warnings -vv \
16-
--pyargs numba_dpex.tests.kernel_tests.test_atomic_op::test_atomic_fp_native
1710
done
1811

1912
exit 0

environment/coverage.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dependencies:
1313
- numba=0.57
1414
- dpctl
1515
- dpnp
16-
- spirv-tools
1716
- dpcpp-llvm-spirv
1817
- opencl_rt
1918
- coverage

environment/docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dependencies:
1313
- numba=0.57
1414
- dpctl
1515
- dpnp
16-
- spirv-tools
1716
- dpcpp-llvm-spirv
1817
- opencl_rt
1918
- pip

numba_dpex/ocl/atomics/atomic_ops.cl

Lines changed: 0 additions & 143 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
import os
6-
import shutil
7-
import subprocess
86
import sys
97
import sysconfig
108

119
import dpctl
1210
import numba
1311
import numpy
14-
import setuptools.command.develop as orig_develop
15-
import setuptools.command.install as orig_install
1612
from setuptools import Extension, find_packages, setup
1713

1814
import versioneer
@@ -62,83 +58,6 @@ def get_ext_modules():
6258
return ext_modules
6359

6460

65-
class install(orig_install.install):
66-
def run(self):
67-
spirv_compile()
68-
super().run()
69-
70-
71-
class develop(orig_develop.develop):
72-
def run(self):
73-
spirv_compile()
74-
super().run()
75-
76-
77-
def _get_cmdclass():
78-
cmdclass = versioneer.get_cmdclass()
79-
cmdclass["install"] = install
80-
cmdclass["develop"] = develop
81-
return cmdclass
82-
83-
84-
def spirv_compile():
85-
if IS_LIN:
86-
compiler = "icx"
87-
if IS_WIN:
88-
compiler = "clang.exe"
89-
90-
clang_args = [
91-
compiler,
92-
"-flto",
93-
"-fveclib=none",
94-
"-target",
95-
"spir64-unknown-unknown",
96-
"-c",
97-
"-x",
98-
"cl",
99-
"-emit-llvm",
100-
"-cl-std=CL2.0",
101-
"-Xclang",
102-
"-finclude-default-header",
103-
"numba_dpex/ocl/atomics/atomic_ops.cl",
104-
"-o",
105-
"numba_dpex/ocl/atomics/atomic_ops.bc",
106-
]
107-
spirv_args = [
108-
_llvm_spirv(),
109-
"--spirv-max-version",
110-
"1.0",
111-
"numba_dpex/ocl/atomics/atomic_ops.bc",
112-
"-o",
113-
"numba_dpex/ocl/atomics/atomic_ops.spir",
114-
]
115-
subprocess.check_call(
116-
clang_args,
117-
stderr=subprocess.DEVNULL,
118-
stdout=subprocess.DEVNULL,
119-
shell=False,
120-
)
121-
subprocess.check_call(
122-
spirv_args,
123-
stderr=subprocess.DEVNULL,
124-
stdout=subprocess.DEVNULL,
125-
shell=False,
126-
)
127-
128-
129-
def _llvm_spirv():
130-
"""Return path to llvm-spirv executable."""
131-
132-
try:
133-
import dpcpp_llvm_spirv as dls
134-
except ImportError:
135-
raise ImportError("Cannot import dpcpp-llvm-spirv package")
136-
137-
result = dls.get_llvm_spirv_path()
138-
139-
return result
140-
141-
14261
packages = find_packages(
14362
include=["numba_dpex", "numba_dpex.*", "_dpexrt_python"]
14463
)
@@ -151,7 +70,6 @@ def _llvm_spirv():
15170
metadata = dict(
15271
name="numba-dpex",
15372
version=versioneer.get_version(),
154-
cmdclass=_get_cmdclass(),
15573
description="An extension for Numba to add data-parallel offload capability",
15674
url="https://github.com/IntelPython/numba-dpex",
15775
packages=packages,

0 commit comments

Comments
 (0)