-
Notifications
You must be signed in to change notification settings - Fork 353
Add discovery of arch-specific vulkan ICD #1125
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
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.
Thanks for working on this, @elezar !
internal/discover/graphics.go
Outdated
archSpecificICD = "vulkan/icd.d/nvidia_icd.x86_64.json" | ||
case "arm64": | ||
// TODO: Validate whether the aarch64 infix is correct. | ||
archSpecificICD = "vulkan/icd.d/nvidia_icd.aarch64.json" |
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.
I think aarch64
is correct. The sources of the RPM Fusion build for the proprietary NVIDIA driver uses %{_target_cpu}
, and I expect that to evaluate to aarch64
.
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.
Thanks. Let's keep it as is and we can follow-up again before the final v1.18.0 release if we have a chance to test on an arm64-based system.
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
thanks for the issues and references
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.
Pull Request Overview
Adds architecture-specific Vulkan ICD discovery for RPM-based platforms by importing runtime
and including an arch-qualified JSON path alongside the standard ICD file.
- Import the Go
runtime
package - Determine an arch-specific ICD filename based on
runtime.GOARCH
- Append the arch-specific path to the list of required Vulkan ICD files
internal/discover/graphics.go
Outdated
required: []string{ | ||
"vulkan/icd.d/nvidia_icd.json", | ||
archSpecificICD, | ||
"vulkan/icd.d/nvidia_layers.json", | ||
"vulkan/implicit_layer.d/nvidia_layers.json", | ||
}, |
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.
If runtime.GOARCH
isn't "amd64" or "arm64", archSpecificICD
will be an empty string and end up in required
, causing an invalid path. Consider appending archSpecificICD
only when it's non-empty or adding a default case to the switch.
required: []string{ | |
"vulkan/icd.d/nvidia_icd.json", | |
archSpecificICD, | |
"vulkan/icd.d/nvidia_layers.json", | |
"vulkan/implicit_layer.d/nvidia_layers.json", | |
}, | |
required: func() []string { | |
required := []string{ | |
"vulkan/icd.d/nvidia_icd.json", | |
"vulkan/icd.d/nvidia_layers.json", | |
"vulkan/implicit_layer.d/nvidia_layers.json", | |
} | |
if archSpecificICD != "" { | |
required = append(required, archSpecificICD) | |
} | |
return required | |
}(), |
Copilot uses AI. Check for mistakes.
Pull Request Test Coverage Report for Build 15452754611Details
💛 - Coveralls |
On some RPM-based platforms, the path of the Vulkan ICD file include an architecture-specific infix to distinguish it from other architectures. (Most notably x86_64 vs i686). This change attempts to discover the arch-specific ICD file in addition to the standard nvidia_icd.json. Signed-off-by: Evan Lezar <[email protected]>
On some RPM-based platforms, the path of the Vulkan ICD file include an architecture-specific infix to distinguish it from other architectures. (Most notably x86_64 vs i686). This change attempts to discover the arch-specific ICD file in addition to the standard nvidia_icd.json.
See:
vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER
) #1124