Skip to content

Commit

Permalink
[FRONTEND] Remove unused json parse in triton.compile (#5510)
Browse files Browse the repository at this point in the history
This line is somewhat expensive since it reads a file from disk.

As far as I can tell it is a duplicate of this line (which is actually
used):

https://github.com/triton-lang/triton/blob/d9facf3a6edbc819c80d58b87e689bc0c2632756/python/triton/compiler/compiler.py#L360
  • Loading branch information
jansel authored Dec 30, 2024
1 parent d9facf3 commit 2f8fe0d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion python/triton/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ def compile(src, target=None, options=None):
always_compile = os.environ.get("TRITON_ALWAYS_COMPILE", "0") == "1"
if not always_compile and metadata_path is not None:
# cache hit!
metadata = json.loads(Path(metadata_path).read_text())
return CompiledKernel(src, metadata_group, hash)
# initialize metadata
metadata = {
Expand Down

0 comments on commit 2f8fe0d

Please sign in to comment.