Skip to content

Deduplicate _max_smem_per_block_optin across 5 files #3

Description

@haix716

Problem

The function _max_smem_per_block_optin is copy-pasted identically across 5 files:

  • moonep/prefetch.py
  • moonep/grad_reduce.py
  • moonep/dispatch_epilogue.py
  • moonep/combine_prologue.py
  • moonep/combine.py

Recommendation

Move to moonep/_common.py (which already exists and contains shared utilities like inline_ptx, grid_sync, etc.) and import from there.

Impact

Maintainability. If the function needs to change (e.g., new GPU architecture support), it currently requires editing 5 files. Should be 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions