Skip to content
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

Framework for getting device information #51

Open
c0d3st0rm opened this issue Jun 12, 2020 · 0 comments
Open

Framework for getting device information #51

c0d3st0rm opened this issue Jun 12, 2020 · 0 comments

Comments

@c0d3st0rm
Copy link

There are certain extensions like VK_AMD_shader_core_properties which could be useful in a compute scenario, as Vulkan does not (to my knowledge) provide an offical method of getting device information, for example the number of compute units. The information from VK_AMD_shader_core_properties could be exposed via vuh::Device with a function, for example

auto getShaderCorePropertiesAMD()-> vk::PhysicalDeviceShaderCorePropertiesAMD;

However I'm unsure if this is an approach that vuh would benefit from - it is specific to AMD devices and, while you could load it implicitly and then add runtime checks to the getShaderCorePropertiesAMD call (throwing an error if VK_AMD_shader_core_properties was not loaded), it might be better to have a more generic device information function. This could be implemented for AMD GPUs using VK_AMD_shader_core_properties, however that would only be possible if respective/similar extensions for Intel and Nvidia GPUs existed (I have not checked) and shared a "common" way of describing a GPU's internals, or enough information to provide the results in a generic manner - this is available to an extent with OpenCL (for example using CL_DEVICE_MAX_COMPUTE_UNITS), however even that is imperfect - for example, see https://stackoverflow.com/a/9326978.

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

No branches or pull requests

1 participant