Skip to content

Commit 472d1be

Browse files
committed
change default libversion to 2
Signed-off-by: jinge90 <[email protected]>
1 parent 24fa45a commit 472d1be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,9 @@ bool ProgramManager::isSpecialDeviceImageShouldBeUsed(
629629
int Bfloat16DeviceLibVersion = -1;
630630
if (m_Bfloat16DeviceLibImages[0].get() == BinImage)
631631
Bfloat16DeviceLibVersion = 0;
632-
if (m_Bfloat16DeviceLibImages[1].get() == BinImage)
632+
else if (m_Bfloat16DeviceLibImages[1].get() == BinImage)
633633
Bfloat16DeviceLibVersion = 1;
634+
634635
if (Bfloat16DeviceLibVersion != -1) {
635636
// Currently, only bfloat conversion devicelib are supported, so the prop
636637
// DeviceLibMeta are only used to represent fallback or native version.
@@ -1850,7 +1851,8 @@ static bool isBfloat16DeviceLibImage(sycl_device_binary RawImg,
18501851
if (!LibVersion)
18511852
return true;
18521853

1853-
*LibVersion = 0;
1854+
// Valid version for bfloat16 device library is 0(fallback), 1(native).
1855+
*LibVersion = 2;
18541856
sycl_device_binary_property ImgP;
18551857
for (ImgP = ImgPS->PropertiesBegin; ImgP != ImgPS->PropertiesEnd;
18561858
++ImgP) {

0 commit comments

Comments
 (0)