NVIDIA / NVIDIA/cutlass

[QST]Why we use setmaxnreg? Does this change register/Occupancy?

Open
#1,676 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

? - Needs Triage inactive-30d inactive-90d question
Dominant language
C++
Stars
10.5k
Forks
2.1k
Avg merge
3d 11h
Merged PRs (30d)
7

Description

setmaxnreg is a new feature since Hopper. I noticed this in cutlass:
https://github.com/NVIDIA/cutlass/blob/eee0cab26c8eedea447eb3b58b3498eeba2294da/include/cutlass/gemm/kernel/sm90_gemm_tma_warpspecialized_cooperative.hpp#L446
From above, the consumer register is 232, the producer register is 40.
Different warp can use different register number??? This will affect Occupancy.
Also, we can dynamicaly modify register during kernel running? This will affect Occupancy.
Using NCU, I find a static register number 168, not 232, not 40. Anything wrong?
56874582e553d9cf4bcd455b9332988

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the setmaxnreg use at include/cutlass/gemm/kernel/sm90_gemm_tma_warpspecialized_cooperative.hpp around line 446, then compare the reported values with the attached NCU result. Determine how the producer and consumer register settings relate to the observed static register count and occupancy, and document the explanation for the questions raised.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.