taichi icon indicating copy to clipboard operation
taichi copied to clipboard

[AOT] Do not re-JIT if the kernel has been added to the AOT module already

Open k-ye opened this issue 3 years ago • 1 comments

Describe the bug

If a kernel has been added to an AOT module multiple times, it should only be JIT once. While I found this problem for taichi kernels, we should also check for fields.

To Reproduce

Repro platform: macOS + Metal backend

m = ti.aot.Module(ti.metal)
m.add_kernel(foo)
m.add_kernel(foo)

k-ye avatar Mar 16 '22 03:03 k-ye

This isn't a v1.1.0 blocker so I'll remove it from the milestone for now.

ailzhang avatar Aug 03 '22 03:08 ailzhang