-
Notifications
You must be signed in to change notification settings - Fork 76
print shared memory limited blocks per SM #5813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Auto-merge Status✅ Internal CI is finished Description
|
| Relevant files | |||
|---|---|---|---|
| Enhancement |
|
PR Reviewer Guide
Here are some key observations to aid the review process:
| 🧪 PR contains tests |
| ⚡ Recommended focus areas for review |
Missing function validation
deviceAvailableSharedMemoryBytes() but there's no indication this function exists or is properly implemented. Need to verify this function is available and returns the correct value for the target device. |
|
!build |
Greptile OverviewGreptile SummaryAdded debug output for shared memory usage metrics when
Issue found:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Caller
participant computeSharedMemory
participant deviceAvailableSharedMemoryBytes
participant debug
Caller->>computeSharedMemory: Request shared memory calculation
computeSharedMemory->>computeSharedMemory: Calculate total from buffers
alt DebugDumpOption::DynamicSharedMemory enabled
computeSharedMemory->>deviceAvailableSharedMemoryBytes: Get available shared memory
deviceAvailableSharedMemoryBytes-->>computeSharedMemory: Return size_t bytes
computeSharedMemory->>debug: Print total requested bytes
computeSharedMemory->>debug: Print available bytes
alt total > 0
computeSharedMemory->>computeSharedMemory: Calculate blocks per SM
computeSharedMemory->>debug: Print blocks per SM (available/total)
else total == 0
computeSharedMemory->>debug: Print unlimited blocks per SM
end
end
computeSharedMemory-->>Caller: Return total bytes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
| } | ||
| } | ||
| if (isDebugDumpEnabled(DebugDumpOption::DynamicSharedMemory)) { | ||
| int64_t available_shared_memory_bytes = deviceAvailableSharedMemoryBytes(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deviceAvailableSharedMemoryBytes() returns size_t (unsigned), not int64_t (signed)
| int64_t available_shared_memory_bytes = deviceAvailableSharedMemoryBytes(); | |
| size_t available_shared_memory_bytes = deviceAvailableSharedMemoryBytes(); |
jacobhinkle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| } | ||
| } | ||
| if (isDebugDumpEnabled(DebugDumpOption::DynamicSharedMemory)) { | ||
| int64_t available_shared_memory_bytes = deviceAvailableSharedMemoryBytes(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| int64_t available_shared_memory_bytes = deviceAvailableSharedMemoryBytes(); | |
| const size_t available_shared_memory_bytes = deviceAvailableSharedMemoryBytes(); |
No description provided.