Skip to content

Commit 01b54ec

Browse files
committed
Add SYCLCompileError
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
1 parent 693ad86 commit 01b54ec

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

torch/_inductor/codecache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3464,7 +3464,7 @@ def compile(
34643464
cmd_parts, stderr=subprocess.STDOUT, env=os.environ
34653465
)
34663466
except subprocess.CalledProcessError as error:
3467-
raise exc.CUDACompileError(cmd_parts, error.output) from error
3467+
raise exc.SYCLCompileError(cmd_parts, error.output) from error
34683468
end_time = time()
34693469
log_duration_msg = f"SYCL Compilation took {end_time - start_time} seconds. Compile command: {cmd}"
34703470
log.info(log_duration_msg)

torch/_inductor/exc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ class CUDACompileError(CppCompileError):
113113
pass
114114

115115

116+
class SYCLCompileError(CppCompileError):
117+
pass
118+
119+
116120
class TritonMissing(ShortenTraceback):
117121
def __init__(self, first_useful_frame: Optional[types.FrameType]) -> None:
118122
super().__init__(

0 commit comments

Comments
 (0)