Skip to content

Commit 09ceb10

Browse files
authored
[ESIMD] Fix compilation errors caused by type_name() function (#9092)
The function type_name had 'static' keyword which caused warnings. Also because the function did not have a default implementation it caused linkage errors on Windows. Fixed by this patch. Fixes #8934 --------- Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent 836ceec commit 09ceb10

File tree

5 files changed

+7
-18
lines changed

5 files changed

+7
-18
lines changed

sycl/test-e2e/ESIMD/dword_atomic_cmpxchg.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==---------------- dword_atomic_smoke.cpp - DPC++ ESIMD on-device test --==//
1+
//==-------------- dword_atomic_cmpxchg.cpp - DPC++ ESIMD on-device test --==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,15 +10,12 @@
1010
// REQUIRES: gpu
1111
// UNSUPPORTED: gpu-intel-gen9 && windows
1212
// UNSUPPORTED: cuda || hip
13-
// TODO: Re-enable this test on Windows after the following issue gets fixed:
14-
// https://github.com/intel/llvm/issues/8934
15-
// UNSUPPORTED: windows
16-
// TODO: esimd_emulator fails due to random timeouts (_XFAIL_: esimd_emulator)
13+
// TODO: esimd_emulator fails due to random timeouts
1714
// UNSUPPORTED: esimd_emulator
1815
// RUN: %clangxx -fsycl %s -o %t.out
1916
// RUN: %GPU_RUN_PLACEHOLDER %t.out
2017

21-
// This macro enables only cmpxch tests. They may require more time to execute,
18+
// This macro enables only cmpxchg tests. They may require more time to execute,
2219
// and have higher probablity to hit kernel execution time limit, so they are
2320
// separated.
2421
#define CMPXCHG_TEST

sycl/test-e2e/ESIMD/dword_atomic_cmpxchg_scalar_off.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
// REQUIRES: gpu
1111
// UNSUPPORTED: gpu-intel-gen9 && windows
1212
// UNSUPPORTED: cuda || hip
13-
// TODO: Re-enable this test on Windows after the following issue gets fixed:
14-
// https://github.com/intel/llvm/issues/8934
15-
// UNSUPPORTED: windows
16-
// TODO: esimd_emulator fails due to random timeouts (_XFAIL_: esimd_emulator)
13+
// TODO: esimd_emulator fails due to random timeouts
1714
// UNSUPPORTED: esimd_emulator
1815
// RUN: %clangxx -fsycl %s -o %t.out
1916
// RUN: %GPU_RUN_PLACEHOLDER %t.out
2017

21-
// This macro enables only cmpxch tests. They may require more time to execute,
18+
// This macro enables only cmpxchg tests. They may require more time to execute,
2219
// and have higher probablity to hit kernel execution time limit, so they are
2320
// separated.
2421
#define CMPXCHG_TEST

sycl/test-e2e/ESIMD/dword_atomic_smoke.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
// REQUIRES: gpu
1111
// UNSUPPORTED: gpu-intel-gen9 && windows
1212
// UNSUPPORTED: cuda || hip
13-
// TODO: Re-enable this test on Windows after the following issue gets fixed:
14-
// https://github.com/intel/llvm/issues/8934
15-
// UNSUPPORTED: windows
13+
1614
// RUN: %clangxx -fsycl %s -o %t.out
1715
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1816

sycl/test-e2e/ESIMD/dword_atomic_smoke_scalar_off.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
// REQUIRES: gpu
1111
// UNSUPPORTED: gpu-intel-gen9 && windows
1212
// UNSUPPORTED: cuda || hip
13-
// TODO: Re-enable this test on Windows after the following issue gets fixed:
14-
// https://github.com/intel/llvm/issues/8934
15-
// UNSUPPORTED: windows
1613
// TODO: esimd_emulator fails due to random timeouts (_XFAIL_: esimd_emulator)
1714
// UNSUPPORTED: esimd_emulator
1815
// RUN: %clangxx -fsycl %s -o %t.out

sycl/test-e2e/ESIMD/esimd_test_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ std::unique_ptr<T, USMDeleter> usm_malloc_shared(queue q, int n) {
568568
return std::move(res);
569569
}
570570

571-
template <class T> static const char *type_name();
571+
template <class T> const char *type_name() { return typeid(T).name(); }
572572
#define TID(T) \
573573
template <> const char *type_name<T>() { return #T; }
574574
TID(char) // for some reason, 'char' does not match 'int8_t' during

0 commit comments

Comments
 (0)