GPUOpen-Tools / gpu_performance_api

GPU Performance API for AMD GPUs
MIT License
250 stars 46 forks source link

Why are are all counters FLOAT64? #39

Closed chaoticbob closed 5 years ago

chaoticbob commented 5 years ago

Vulkan: https://github.com/GPUOpen-Tools/GPA/blob/master/Src/GPUPerfAPICounterGenerator/PublicCounterDefsVKGfx9.cpp#L13

DX12: https://github.com/GPUOpen-Tools/GPA/blob/master/Src/GPUPerfAPICounterGenerator/PublicCounterDefsVKGfx9.cpp#L13

Definitions: https://github.com/GPUOpen-Tools/GPA/blob/master/Src/PublicCounterCompilerInputFiles/PublicCounterDefinitionsGfx9.txt

chesik-amd commented 5 years ago

I don't really have a good answer here other than to say "for historical reasons". It's just always been that way. For now, it's best to treat them all as float even the ones where it doesn't make sense to have a fractional count.

This is something we may change in the future but for now, this is the way it is.

chaoticbob commented 5 years ago

Is it safe to cast some of the values back to UINT64 simply for display purposes based on the USAGE?

chesik-amd commented 5 years ago

Yes, that should be safe. If you run into problems with this, please let us know.

chaoticbob commented 5 years ago

Thanks!