Skip to content

Conversation

@nithinsubbiah
Copy link
Contributor

@nithinsubbiah nithinsubbiah commented Dec 8, 2025

Adds a check for cooperative groups support in the driver.

Copy link
Collaborator

@antiagainst antiagainst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure this is proper--cooperative launch should not depend on num ctas > 1.

@nithinsubbiah nithinsubbiah changed the title [AMD] Launch hipModuleLaunchCooperativeKernel only for multiple ctas [AMD] Add check for cooperative groups support in driver Dec 8, 2025
assert isinstance(driver, HIPDriver)
device = driver.get_current_device()
device_properties = driver.utils.get_device_properties(device)
self.launch_cooperative_grid = device_properties['cooperativeLaunch']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should assert the device supports cooperative launch here instead of silently overwriting what the developer said. Rationale being that the developer indicates they want cooperative launch. That's likely due to some forward progress needs which demands certain number of blocks to co-launch. By silently overwriting that it can be a big suprise for developers to see hangs or incorrect results. In general, if reality doesn't match with what the developer explicitly said, better to be noisy and error out than "correct" it under the hood for developer.

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.

2 participants