-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding cache and specialization to func decorator
- Loading branch information
1 parent
187782d
commit d25b525
Showing
6 changed files
with
272 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
1. Specialized function gets compiled when the file is loaded | ||
2. Dig into: | ||
cres.typing_context.insert_user_function(devfn, _function_template) | ||
libs = [cres.library] | ||
cres.target_context.insert_user_function(devfn, cres.fndesc, libs) | ||
3. why the numba code is downcasting? Look into the lowering logic | ||
%".87" = fptosi double %".86" to i32 | ||
store i32 0, i32* %".88" | ||
%".91" = call spir_func i32 @"dpex_py_devfn__5F__5F_main_5F__5F__2E_a_5F_device_5F_function_2E_int32"(i32* %".88", i32 %".87") | ||
4. This is what should happen: if a func is specialized, dpex should throw an error rather than doing an automatic typecasting. | ||
5. look into numba's lowering and intercept the typecasting -- the goal is to stop lowering when type doesn't match in specialization case | ||
6. Most likely 867 will be resolved if these problems are addressed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.