Skip to content

[Bug Fix]Fixed compilation error when using StreamK scheduler + PDL(SM90)#2686

Merged
hwu36 merged 1 commit intoNVIDIA:mainfrom
HydraQYH:fix_sm90_stream_k_with_pdl
Oct 22, 2025
Merged

[Bug Fix]Fixed compilation error when using StreamK scheduler + PDL(SM90)#2686
hwu36 merged 1 commit intoNVIDIA:mainfrom
HydraQYH:fix_sm90_stream_k_with_pdl

Conversation

@HydraQYH
Copy link
Copy Markdown
Contributor

When using StreamKScheduler on the SM90 architecture, if PDL is set (-DCUTLASS_ENABLE_GDC_FOR_SM90=1), the following compilation error will occur:
image
The reason is that is_last_tile is a Const Member Function, which should not modify any member variables, but it now modifies the unit_iter_start_ member variable:

CUTLASS_DEVICE
bool is_last_tile(WorkTileInfo work_tile_info, uint32_t advance_count = 1) const {
// Never pass this by reference; it needs a copy,
// because continue_current_work will modify it.
if (continue_current_work(work_tile_info)) {
return false;
}
return not get_current_work_for_linear_idx(
unit_iter_start_,
current_work_linear_idx_ + (
uint64_t(gridDim.x) * uint64_t(gridDim.y) * uint64_t(gridDim.z) * uint64_t(advance_count)
),
block_id_in_cluster_,
scheduler_params
).is_valid();
}

So I create a copy in is_last_tile to avoid unit_iter_start_ being modified. I have verified this on example_48 and example_67.

@HydraQYH
Copy link
Copy Markdown
Contributor Author

@hwu36 Can you take a look?

@hwu36
Copy link
Copy Markdown
Collaborator

hwu36 commented Oct 15, 2025

@jackkosaian, could you please take a look?

@jackkosaian
Copy link
Copy Markdown
Collaborator

Looks good to me.

@hwu36 hwu36 merged commit b2ca083 into NVIDIA:main Oct 22, 2025
guocuimi pushed a commit to vectorch-ai/cutlass that referenced this pull request Nov 6, 2025
liji-nv pushed a commit to liji-nv/cutlass that referenced this pull request Nov 20, 2025
Junkai-Wu added a commit that referenced this pull request Nov 20, 2025
Fixed compilation error when using StreamK scheduler + PDL. (#2686)
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.

3 participants