Skip to content

Commit 219a894

Browse files
committed
Add SYCLCompileError
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
1 parent 484d217 commit 219a894

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
@@ -3317,7 +3317,7 @@ def compile(
33173317
cmd_parts, stderr=subprocess.STDOUT, env=os.environ
33183318
)
33193319
except subprocess.CalledProcessError as error:
3320-
raise exc.CUDACompileError(cmd_parts, error.output) from error
3320+
raise exc.SYCLCompileError(cmd_parts, error.output) from error
33213321
end_time = time()
33223322
log_duration_msg = f"SYCL Compilation took {end_time - start_time} seconds. Compile command: {cmd}"
33233323
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)