8000 Update torch/utils/cpp_extension.py · pytorch/pytorch@78de53a · GitHub
[go: up one dir, main page]

Skip to content

Commit 78de53a

Browse files
jingxu10dvrogozh
authored andcommitted
Update torch/utils/cpp_extension.py
Co-authored-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
1 parent f2c02e7 commit 78de53a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

torch/utils/cpp_extension.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ def _get_sycl_arch_list():
291291
arch_list = [x for x in arch_list if not x.startswith('dg2')]
292292
return ','.join(arch_list)
293293

294+
# If arch list returned by _get_sycl_arch_list() is empty, then sycl kernels will be compiled
295+
# for default spir64 target and avoid device specific compilations entirely. Further, kernels
296+
# will be JIT compiled at runtime.
294297
_COMMON_SYCL_FLAGS = [
295298
'-fsycl',
296299
'-fsycl-targets=spir64_gen,spir64' if _get_sycl_arch_list() != '' else '',

0 commit comments

Comments
 (0)
0