Skip to content

Conversation

@ThomasRaoux
Copy link
Collaborator

No description provided.

@ThomasRaoux ThomasRaoux requested a review from ptillet as a code owner November 21, 2025 04:23
@ThomasRaoux ThomasRaoux marked this pull request as draft November 21, 2025 04:26
if 'jit_function' in value:
jf_key = value['jit_function']
if jf_key in _triton_jit_function_registry:
return _triton_jit_function_registry[jf_key]
Copy link
Contributor

@peterbell10 peterbell10 Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preload is usually used in a different python process than the one where the specialization info was created, so the availability of the functions will depend on all imports happening before you run the preload calls.

Here is a reference solution that I wrote several years ago that does the import dynamically:
https://github.com/Quansight-Labs/uarray/blob/92216042c8e350cb174e6ddabbe70bf31132cac4/src/uarray/_backend.py#L64-L110

This removes the import dependence, but does limit it to only working on importable function; i.e. not defined in main or inside a function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, yes that's what I'm trying to evaluate right now. Sounds like doing something like that would be a good direction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants