Skip to content

Commit 0ecb172

Browse files
authored
[NFC] Make attrs type for AOT the same as JIT (#5702)
The main problem why it is easier to change the type for AOT compilation is that `json` module has a limitation on serialization/deserialization (`dumps/loads`) of `tuple` type, which will be processed as `list`. In general, I can write a custom serialization/deserialization function, but this will also need to be done by everyone who works with the Triton cache directly (this may need to be done in PyTorch), which seems undesirable. --------- Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 98b40d5 commit 0ecb172

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/triton/tools/compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def constexpr(s):
106106
# compile ast into cubin
107107
for h in hints.values():
108108
assert h in [1, 16], f"Only 1 and 16 are valid hints, got {h}"
109-
attrs = {k: [("tt.divisibility", 16)] for k, v in hints.items() if v == 16}
109+
attrs = {k: [["tt.divisibility", 16]] for k, v in hints.items() if v == 16}
110110
src = triton.compiler.ASTSource(fn=kernel, constexprs=constants, signature=signature, attrs=attrs)
111111
opts = {"num_warps": args.num_warps, "num_stages": args.num_stages}
112112
ccinfo = triton.compile(src, options=opts)

0 commit comments

Comments
 (0)