[BUG] Sm90 & Sm100 Array gemm kernels read ahead of `wait_on_dependent_grids()`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
Description
Which component has the problem?
CUTLASS C++
Bug Report
Describe the bug
First, the first element of the array containing problem shapes are accessed in the constructor of group tile scheduler.
https://github.com/NVIDIA/cutlass/blob/8debf77437753beca676eb3c6bf97b56a5f9fd68/include/cutlass/gemm/kernel/sm90_tile_scheduler_group.hpp#L267
TileScheduler is constructed before the wait_on_dependent_grids(), which could risk a chance reading the pointer arrays before dependent data gets flushed into global memory by a preceding kernel.
This would cause a race condition when PDL is enabled.
Steps/Code to reproduce bug
Hard to reproduce as it's a race condition.
I wish there was some compiler support to spot PDL related bugs, e.g. ,print a warning log when codes in a kernel access to global address before wait_on_dependent_grids(). It was frustrating to figure out this kind of issues.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the constructor and problem-shape access in include/cutlass/gemm/kernel/sm90_tile_scheduler_group.hpp and include/cutlass/gemm/group_array_problem_shape.hpp, then trace the ordering around wait_on_dependent_grids() in the SM90 and SM100 kernel files named in the report. Done means the array data is not read before dependent-grid synchronization when PDL is enabled, with validation for both affected kernels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100