Skip to content

Commit b4b7c5a

Browse files
Revert "[SYCLomatic] Support more python script migration rules (#2750)" (#2756)
This reverts commit 980ac0e.
1 parent 1a56ee6 commit b4b7c5a

File tree

3 files changed

+0
-42
lines changed

3 files changed

+0
-42
lines changed

clang/test/dpct/python_migration/case_006/expected.py

-5
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,3 @@
5656

5757
torch.xpu.set_stream(st)
5858
xpu.set_stream(st)
59-
60-
if torch.xpu.current_stream() != torch.xpu.current_stream():
61-
print("Not default stream")
62-
device = torch.device('xpu')
63-
extra_cuda_cflags=['-ffast-math', '']

clang/test/dpct/python_migration/case_006/input.py

-5
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,3 @@
5656

5757
torch.cuda.set_stream(st)
5858
cuda.set_stream(st)
59-
60-
if torch.cuda.current_stream() != torch.cuda.default_stream():
61-
print("Not default stream")
62-
device = torch.device('cuda')
63-
extra_cuda_cflags=['--use_fast_math', '--allow-unsupported-compiler']

clang/tools/dpct/extensions/python_rules/python_build_script_migration_rule_pytorch_common.yaml

-32
Original file line numberDiff line numberDiff line change
@@ -247,35 +247,3 @@
247247
PythonSyntax: CUDA_HOME
248248
In: CUDA_HOME
249249
Out: SYCL_HOME
250-
251-
- Rule: rule_cuda_flag_use_fast_math
252-
Kind: PythonRule
253-
Priority: Fallback
254-
MatchMode: Partial
255-
PythonSyntax: cuda_flag_use_fast_math
256-
In: '--use_fast_math'
257-
Out: '-ffast-math'
258-
259-
- Rule: rule_cuda_flag_allow-unsupported-compiler
260-
Kind: PythonRule
261-
Priority: Fallback
262-
MatchMode: Partial
263-
PythonSyntax: cuda_flag_allow-unsupported-compiler
264-
In: '--allow-unsupported-compiler'
265-
Out: ''
266-
267-
- Rule: rule_cuda_default_stream
268-
Kind: PythonRule
269-
Priority: Fallback
270-
MatchMode: Full
271-
PythonSyntax: cuda_default_stream
272-
In: torch.cuda.default_stream
273-
Out: torch.xpu.current_stream
274-
275-
- Rule: rule_torch_device_cuda
276-
Kind: PythonRule
277-
Priority: Fallback
278-
MatchMode: Full
279-
PythonSyntax: torch_device_cuda
280-
In: torch.device('cuda')
281-
Out: torch.device('xpu')

0 commit comments

Comments
 (0)