Skip to content

Commit

Permalink
fix for fp16 & fp64
Browse files Browse the repository at this point in the history
  • Loading branch information
rjodinchr committed Jul 3, 2023
1 parent 527f8b5 commit 9f01252
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,15 @@ void cvk_device::init_compiler_options() {
m_device_compiler_options += " -no-16bit-storage=pushconstant ";
}
std::vector<std::string> roundingModeRTE;
if (m_float_controls_properties.shaderRoundingModeRTEFloat16) {
if (m_float_controls_properties.shaderRoundingModeRTEFloat16 &&
supports_fp16()) {
roundingModeRTE.push_back("16");
}
if (m_float_controls_properties.shaderRoundingModeRTEFloat32) {
roundingModeRTE.push_back("32");
}
if (m_float_controls_properties.shaderRoundingModeRTEFloat64) {
if (m_float_controls_properties.shaderRoundingModeRTEFloat64 &&
supports_fp64()) {
roundingModeRTE.push_back("64");
}
if (roundingModeRTE.size() > 0) {
Expand Down

0 comments on commit 9f01252

Please sign in to comment.