File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17- import Cython .Build
1817import setuptools
18+ from Cython .Build import build_ext
1919
2020import dpctl
2121
22+
23+ class custom_build_ext (build_ext ):
24+ def build_extensions (self ):
25+ self .compiler .set_executable ("compiler_so" , "icpx -fsycl -fPIC" )
26+ self .compiler .set_executable ("compiler_cxx" , "icpx -fsycl -fPIC" )
27+ self .compiler .set_executable (
28+ "linker_so" ,
29+ "icpx -fsycl -shared -fpic -fsycl-device-code-split=per_kernel" ,
30+ )
31+ build_ext .build_extensions (self )
32+
33+
2234ext = setuptools .Extension (
2335 "_cython_api" ,
2436 ["_cython_api.pyx" ],
2739)
2840
2941setuptools .setup (
30- name = "_cython_api " ,
42+ name = "test_cython_api " ,
3143 version = "0.0.0" ,
3244 ext_modules = [ext ],
33- cmdclass = {"build_ext" : Cython . Build . build_ext },
45+ cmdclass = {"build_ext" : custom_build_ext },
3446)
You can’t perform that action at this time.
0 commit comments