You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[typehint][python] Unify compile_module_from_src from nvidia + amd backends, make more defensive (triton-lang#6775)
I started looking at adding typehints to python/triton/backends and
noticed there's a bit of duplicated code across the nvidia and amd
implementations. To start, I think we can unify the
`compile_module_from_src` since it appears the implementations are
identical.
Additionally, I added some extra defensive checks to the implementation
in case the cache returns a faulty artifact. Ideally this shouldn't
happen, but figure better to have a cache miss than a crash. We can
remove this if it seems superfluous.
I plan to add some tests, but wanted to open the PR ahead of time for
visibility (tests will be verifying compilation / loading succeeds &
that fallback to compiling with bad artifact succeeds)
0 commit comments