[FRONTEND] Bunch of fixes here and there (#436)

This commit is contained in:
Philippe Tillet
2022-01-20 10:55:59 -08:00
committed by GitHub
parent e0c5709cc8
commit 4c97d1ecd7
7 changed files with 71 additions and 39 deletions

View File

@@ -79,7 +79,7 @@ def to_numpy(x):
def patch_kernel(template, to_replace):
kernel = copy.deepcopy(template)
kernel = triton.JITFunction(template.fn)
for key, value in to_replace.items():
kernel.src = kernel.src.replace(key, value)
return kernel