Skip to content

Update starter.cute.py: add fnv1a_hash for CuTeDSL#220

Closed
DiamondI wants to merge 1 commit intoAlphaGPU:mainfrom
DiamondI:patch-1
Closed

Update starter.cute.py: add fnv1a_hash for CuTeDSL#220
DiamondI wants to merge 1 commit intoAlphaGPU:mainfrom
DiamondI:patch-1

Conversation

@DiamondI
Copy link
Copy Markdown
Contributor

Add fnv1a_hash for CuTeDSL

@kunal-mansukhani
Copy link
Copy Markdown
Contributor

@claude please fix lint

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 21, 2026

Thanks for the contribution @DiamondI! There's a bug in this PR: FNV_PRIME and OFFSET_BASIS are used in fnv1a_hash_u32_scalar but never defined, which would cause a NameError at runtime. All other framework starters define these constants inside the hash function.

I've opened a fix PR at #223 that adds the missing constant definitions inside the function body, matching the pattern used across CUDA, Triton, JAX, PyTorch, and Mojo starters.

kunal-mansukhani pushed a commit that referenced this pull request Mar 21, 2026
* Update starter.cute.py: add fnv1a_hash for CuTeDSL

Add fnv1a_hash for CuTeDSL

* Fix missing FNV_PRIME and OFFSET_BASIS constants in CuTe starter

The fnv1a_hash_u32_scalar helper referenced FNV_PRIME and OFFSET_BASIS
without defining them, causing a NameError at runtime. Add the constant
definitions inside the function body, matching the pattern used in all
other framework starters (CUDA, Triton, JAX, PyTorch, Mojo).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Andrew <920076768@qq.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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