Skip to content

Pass repr=key when calling JITFunction.cache_hook#4207

Closed
jlebar wants to merge 1 commit intomainfrom
kernel-name
Closed

Pass repr=key when calling JITFunction.cache_hook#4207
jlebar wants to merge 1 commit intomainfrom
kernel-name

Conversation

@jlebar
Copy link
Copy Markdown
Contributor

@jlebar jlebar commented Jun 25, 2024

Before this PR, we had two key-like strings for JITFunctions.

  • key: Guaranteed unique per compiled kernel, suitable for caching.
  • repr: Not guaranteed-unique, missing some fields (for example, can't
    distinguish between fp32 and fp16 params), but perhaps more human-readable
    than key?

This PR removes repr and replaces it with key, thus removing a footgun.

Before this PR, we had two key-like strings for JITFunctions.

 - key: Guaranteed unique per compiled kernel, suitable for caching.
 - repr: Not guaranteed-unique, missing some fields (for example, can't
   distinguish between fp32 and fp16 params), but perhaps more human-readable
   than `key`?

This PR removes repr and replaces it with key, thus removing a footgun.
@jlebar jlebar changed the title kernel name Pass repr=key when calling JITFunction.cache_hook Jun 25, 2024
@jlebar jlebar closed this Jun 25, 2024
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.

1 participant