Skip to content

Commit 83e9a14

Browse files
Fix: Unify fp16/fp32/fp64 flags across all platforms
Unify fp16/fp32/fp64 across all platforms. The capabilities indicated by those flags now refer to both emulated and native-supported (HW) ones: - Global/local atomic load: HW support on all platforms (handled by native i16 atomic or) for FP16, FP32 and FP64. - Global/local atomic store: HW support on all platforms (handled by native i16 atomic exchange) for FP16, FP32 and FP64. - Global/local atomic compare/exchange: HW support on all platforms for FP32. - Global/local atomic min/max: Emulation support on all platforms for FP64, HW support on all platforms for FP32, HW support on XE+ platforms and emulation support on all others for FP16. - Global atomic add: HW support for PVC+ platforms, emulation support on all other platforms for FP64, HW support on XE+ platforms and emulation support on all other platforms for FP32. - Local atomic add: Emulation on all platforms for both FP64 and FP32. Signed-off-by: Kacper Nowak <[email protected]> Related-To: NEO-7734
1 parent 1ddfc9a commit 83e9a14

File tree

14 files changed

+131
-96
lines changed

14 files changed

+131
-96
lines changed

level_zero/core/test/unit_tests/gen11/test_module_gen11.cpp

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/*
2-
* Copyright (C) 2021-2022 Intel Corporation
2+
* Copyright (C) 2021-2023 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8+
#include "shared/source/kernel/kernel_properties.h"
89
#include "shared/test/common/test_macros/hw_test.h"
910

1011
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
@@ -22,9 +23,30 @@ HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPr
2223
ze_result_t res = device->getKernelProperties(&kernelProperties);
2324
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
2425

25-
EXPECT_EQ(0u, kernelExtendedProperties.fp16Flags);
26-
EXPECT_EQ(0u, kernelExtendedProperties.fp32Flags);
27-
EXPECT_EQ(0u, kernelExtendedProperties.fp64Flags);
26+
const auto &fp16Properties = kernelExtendedProperties.fp16Flags;
27+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
28+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
29+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
30+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
31+
32+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
33+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
34+
35+
const auto &fp32Properties = kernelExtendedProperties.fp32Flags;
36+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
37+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
38+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
39+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
40+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
41+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
42+
43+
const auto &fp64Properties = kernelExtendedProperties.fp64Flags;
44+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
45+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
46+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
47+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
48+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
49+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
2850
}
2951

3052
} // namespace ult

level_zero/core/test/unit_tests/gen12lp/test_module_gen12lp.cpp

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/*
2-
* Copyright (C) 2021-2022 Intel Corporation
2+
* Copyright (C) 2021-2023 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8+
#include "shared/source/kernel/kernel_properties.h"
89
#include "shared/test/common/test_macros/hw_test.h"
910

1011
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
@@ -22,9 +23,30 @@ HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPr
2223
ze_result_t res = device->getKernelProperties(&kernelProperties);
2324
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
2425

25-
EXPECT_EQ(0u, kernelExtendedProperties.fp16Flags);
26-
EXPECT_EQ(0u, kernelExtendedProperties.fp32Flags);
27-
EXPECT_EQ(0u, kernelExtendedProperties.fp64Flags);
26+
const auto &fp16Properties = kernelExtendedProperties.fp16Flags;
27+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
28+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
29+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
30+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
31+
32+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
33+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
34+
35+
const auto &fp32Properties = kernelExtendedProperties.fp32Flags;
36+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
37+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
38+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
39+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
40+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
41+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
42+
43+
const auto &fp64Properties = kernelExtendedProperties.fp64Flags;
44+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
45+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
46+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
47+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
48+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
49+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
2850
}
2951

3052
} // namespace ult

level_zero/core/test/unit_tests/gen9/test_module_gen9.cpp

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/*
2-
* Copyright (C) 2021-2022 Intel Corporation
2+
* Copyright (C) 2021-2023 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8+
#include "shared/source/kernel/kernel_properties.h"
89
#include "shared/test/common/test_macros/hw_test.h"
910

1011
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
@@ -29,9 +30,30 @@ HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPr
2930
ze_result_t res = device->getKernelProperties(&kernelProperties);
3031
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
3132

32-
EXPECT_EQ(0u, kernelExtendedProperties.fp16Flags);
33-
EXPECT_EQ(0u, kernelExtendedProperties.fp32Flags);
34-
EXPECT_EQ(0u, kernelExtendedProperties.fp64Flags);
33+
const auto &fp16Properties = kernelExtendedProperties.fp16Flags;
34+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
35+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
36+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
37+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
38+
39+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
40+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
41+
42+
const auto &fp32Properties = kernelExtendedProperties.fp32Flags;
43+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
44+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
45+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
46+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
47+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
48+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
49+
50+
const auto &fp64Properties = kernelExtendedProperties.fp64Flags;
51+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
52+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
53+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
54+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
55+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
56+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
3557
}
3658

3759
} // namespace ult

level_zero/core/test/unit_tests/xe_hpc_core/test_module_xe_hpc_core.cpp

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2022 Intel Corporation
2+
* Copyright (C) 2021-2023 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -23,26 +23,30 @@ HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPr
2323
ze_result_t res = device->getKernelProperties(&kernelProperties);
2424
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
2525

26-
EXPECT_TRUE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
27-
EXPECT_TRUE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
28-
EXPECT_TRUE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
29-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
30-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
31-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
32-
33-
EXPECT_TRUE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
34-
EXPECT_TRUE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
35-
EXPECT_TRUE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
36-
EXPECT_FALSE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
37-
EXPECT_FALSE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
38-
EXPECT_FALSE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
39-
40-
EXPECT_TRUE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
41-
EXPECT_TRUE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
42-
EXPECT_TRUE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
43-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
44-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
45-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
26+
const auto &fp16Properties = kernelExtendedProperties.fp16Flags;
27+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
28+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
29+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
30+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
31+
32+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
33+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
34+
35+
const auto &fp32Properties = kernelExtendedProperties.fp32Flags;
36+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
37+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
38+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
39+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
40+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
41+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
42+
43+
const auto &fp64Properties = kernelExtendedProperties.fp64Flags;
44+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
45+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
46+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
47+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
48+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
49+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
4650
}
4751

4852
} // namespace ult

level_zero/core/test/unit_tests/xe_hpg_core/test_module_xe_hpg_core.cpp

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,30 @@ HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPr
2424
ze_result_t res = device->getKernelProperties(&kernelProperties);
2525
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
2626

27-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
28-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
29-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
30-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
31-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
32-
EXPECT_FALSE(kernelExtendedProperties.fp16Flags & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
33-
34-
EXPECT_FALSE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
35-
EXPECT_TRUE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
36-
EXPECT_FALSE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
37-
EXPECT_FALSE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
38-
EXPECT_FALSE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
39-
EXPECT_FALSE(kernelExtendedProperties.fp32Flags & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
40-
41-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
42-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
43-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
44-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
45-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
46-
EXPECT_FALSE(kernelExtendedProperties.fp64Flags & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
27+
const auto &fp16Properties = kernelExtendedProperties.fp16Flags;
28+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
29+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
30+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
31+
EXPECT_TRUE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
32+
33+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
34+
EXPECT_FALSE(fp16Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
35+
36+
const auto &fp32Properties = kernelExtendedProperties.fp32Flags;
37+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
38+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
39+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
40+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
41+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
42+
EXPECT_TRUE(fp32Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
43+
44+
const auto &fp64Properties = kernelExtendedProperties.fp64Flags;
45+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE);
46+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
47+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
48+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX);
49+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_GLOBAL_ADD);
50+
EXPECT_TRUE(fp64Properties & FP_ATOMIC_EXT_FLAG_LOCAL_ADD);
4751
}
4852

4953
HWTEST2_F(KernelPropertyTest, givenDG2WhenGetInternalOptionsThenWriteBackBuildOptionIsSet, IsDG2) {

shared/source/os_interface/product_helper.inl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "shared/source/helpers/hw_mapper.h"
1515
#include "shared/source/helpers/local_memory_access_modes.h"
1616
#include "shared/source/helpers/preamble.h"
17+
#include "shared/source/kernel/kernel_properties.h"
1718
#include "shared/source/memory_manager/graphics_allocation.h"
1819
#include "shared/source/memory_manager/memory_manager.h"
1920
#include "shared/source/os_interface/product_helper.h"
@@ -34,9 +35,9 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
3435

3536
template <PRODUCT_FAMILY gfxProduct>
3637
void ProductHelperHw<gfxProduct>::getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) const {
37-
*fp16 = 0u;
38-
*fp32 = 0u;
39-
*fp64 = 0u;
38+
*fp16 = (0u | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX | FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX | FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
39+
*fp32 = (0u | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX | FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_LOCAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
40+
*fp64 = (0u | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX | FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_LOCAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE);
4041
}
4142

4243
template <PRODUCT_FAMILY gfxProduct>

shared/source/xe_hp_core/linux/product_helper_xe_hp_sdv.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ uint64_t ProductHelperHw<gfxProduct>::getHostMemCapabilitiesValue() const {
6868
return UNIFIED_SHARED_MEMORY_ACCESS;
6969
}
7070

71-
template <>
72-
void ProductHelperHw<gfxProduct>::getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) const {
73-
*fp16 = 0u;
74-
*fp32 = FP_ATOMIC_EXT_FLAG_GLOBAL_ADD;
75-
*fp64 = 0u;
76-
}
77-
7871
template <>
7972
uint32_t ProductHelperHw<gfxProduct>::getDeviceMemoryMaxClkRate(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) {
8073
return 2800u;

shared/source/xe_hp_core/windows/product_helper_xe_hp_sdv.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,5 @@ bool ProductHelperHw<gfxProduct>::getHostMemCapabilitiesSupported(const Hardware
4141
return true;
4242
}
4343

44-
template <>
45-
void ProductHelperHw<gfxProduct>::getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) const {
46-
*fp16 = 0u;
47-
*fp32 = FP_ATOMIC_EXT_FLAG_GLOBAL_ADD;
48-
*fp64 = 0u;
49-
}
50-
5144
template class ProductHelperHw<gfxProduct>;
5245
} // namespace NEO

shared/source/xe_hpc_core/os_agnostic_product_helper_xe_hpc_core.inl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ void ProductHelperHw<gfxProduct>::adjustSamplerState(void *sampler, const Hardwa
4848
}
4949
}
5050

51-
template <>
52-
void ProductHelperHw<gfxProduct>::getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) const {
53-
*fp16 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
54-
*fp32 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
55-
*fp64 = (FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE | FP_ATOMIC_EXT_FLAG_GLOBAL_ADD | FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX);
56-
}
57-
5851
template <>
5952
bool ProductHelperHw<gfxProduct>::isPrefetcherDisablingInDirectSubmissionRequired() const {
6053
return false;

shared/source/xe_hpg_core/linux/product_helper_dg2.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
constexpr static auto gfxProduct = IGFX_DG2;
2626

2727
#include "shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl"
28-
#include "shared/source/xe_hpg_core/os_agnostic_product_helper_xe_hpg_core.inl"
2928

3029
#include "os_agnostic_product_helper_dg2_extra.inl"
3130

0 commit comments

Comments
 (0)