Skip to content

Fix missing FNV constants in CuTe rainbow table starter (PR #220)#223

Merged
kunal-mansukhani merged 2 commits intomainfrom
claude/pr-220-fixes
Mar 21, 2026
Merged

Fix missing FNV constants in CuTe rainbow table starter (PR #220)#223
kunal-mansukhani merged 2 commits intomainfrom
claude/pr-220-fixes

Conversation

@claude
Copy link
Copy Markdown
Contributor

@claude claude bot commented Mar 21, 2026

Summary

This PR fixes a bug introduced in fork PR #220 by @DiamondI.

  • The fnv1a_hash_u32_scalar helper function referenced FNV_PRIME and OFFSET_BASIS without defining them, which would cause a NameError at runtime
  • All other framework starters (CUDA, Triton, JAX, PyTorch, Mojo) define these constants inside the hash function — the CuTe starter now matches this pattern

Changes

  • Added FNV_PRIME = 16777619 and OFFSET_BASIS = 2166136261 inside fnv1a_hash_u32_scalar in challenges/easy/24_rainbow_table/starter/starter.cute.py

Test plan

  • Linting passes (pre-commit hooks verified at commit time)
  • Starter file runs without errors
  • Constants match values used in challenge.py and all other starters

This PR contains fixes for the fork PR #220 by @DiamondI

Original branch: patch-1

🤖 Generated with Claude Code

DiamondI and others added 2 commits March 19, 2026 11:40
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>
@kunal-mansukhani kunal-mansukhani merged commit f784a4b into main Mar 21, 2026
5 checks passed
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