Skip to content

Vulkan: Add device-specific blacklist for coopmat for the AMD proprietary driver #11074

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

Merged
merged 2 commits into from
Jan 4, 2025

Conversation

0cc4m
Copy link
Collaborator

@0cc4m 0cc4m commented Jan 4, 2025

This adds a workaround for AMD's proprietary Vulkan driver and amdvlk reporting support for cooperative matrix on GPUs without the necessary hardware. Since Vulkan has no concept of compute capability (to my knowledge), I used the device name. Let me know if you see an issue with that.

Please test this with AMD GPUs, especially with Windows or amdvlk, to ensure it works as intended.

@github-actions github-actions bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Jan 4, 2025
if (driver_props.driverID == vk::DriverId::eAmdProprietary || driver_props.driverID == vk::DriverId::eAmdOpenSource) {
// Workaround for AMD proprietary driver reporting support on all GPUs
const std::string name = props.deviceName;
return name.rfind("AMD Radeon RX 7", 0) == 0 || // RDNA 3 consumer GPUs
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way to write this so newer GPUs will be enabled by default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That would be good, but I couldn't think of an easy way. I'm hoping that AMD resolves this in their drivers, then we can just remove the check.

I'll try to figure out the proper way to report this to their Windows and amdvlk driver team.

Copy link
Collaborator

@jeffbolznv jeffbolznv left a comment

Choose a reason for hiding this comment

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

I'm OK with this as a short/medium-term fix. Hopefully there will be a better way in the future.

@0cc4m
Copy link
Collaborator Author

0cc4m commented Jan 4, 2025

I noticed that AMD sometimes adds (TM) after Radeon. Not sure what logic that follows, my 6800 XT on Windows is called AMD Radeon RX 6800 XT, but a 7700S I was testing is called AMD Radeon(TM) RX 7700S. I will have to add that case.

@0cc4m 0cc4m merged commit b56f079 into master Jan 4, 2025
48 checks passed
@0cc4m 0cc4m deleted the 0cc4m/coopmat-blacklist branch January 4, 2025 20:10
tinglou pushed a commit to tinglou/llama.cpp that referenced this pull request Feb 13, 2025
…tary driver (ggml-org#11074)

* Vulkan: Add device-specific blacklist for coopmat for the AMD proprietary driver

* Add (TM) to AMD name check
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Feb 26, 2025
…tary driver (ggml-org#11074)

* Vulkan: Add device-specific blacklist for coopmat for the AMD proprietary driver

* Add (TM) to AMD name check
mglambda pushed a commit to mglambda/llama.cpp that referenced this pull request Mar 8, 2025
…tary driver (ggml-org#11074)

* Vulkan: Add device-specific blacklist for coopmat for the AMD proprietary driver

* Add (TM) to AMD name check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning Vulkan Issues specific to the Vulkan backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants