Allow redefinition of kernel methods#31
Conversation
|
This will still fail when a method called from within the kernel gets updated. Maybe there's a more robust solution, but this would still be useful for now. |
|
cool. |
|
This is flawed, but I'll take it for now (if it works). The proper solution is to include the world age much like how GPUCompiler.jl's cache mechanism work. For testing, you can use a temporary module you |
54d81c5 to
552bc6c
Compare
|
Makes sense.. I'm now using a temporary module like you suggested, and there's no method overwrite warning like before, so if this is fine for now, I think it's ready! |
|
Instead of throwing a method error, this branch seems to error at ERROR: Calling invoke(f, t, args...) would throw:
MethodError: no method matching ...This could be caught, and a real MethodError could be thrown I guess. |
|
Let's go ahead and merge this, but know that I'm actually looking into a 'proper' integration with Julia's compiler infrastructure, which will support redefinitions, correct world age handling, and possibly even disk caching. |
Ensures the cache stays valid by replacing
f, argtypeswith the method instancewhich(f, argtypes)to allow redefinition of kernel methods. This is useful when writing kernels — when writing #16 I actually got all the way up to fmha_kernel95 or something.😅