Skip to content

Commit 183caf3

Browse files
authored
[SYCL][XPTI] Enable XPTI tests (#4545)
- Fix XPTI libraries deployment locations in CMake - Fix incorrect definitions and options in CMake - Enable -Werror for XPTI by default - Add LLVM-style target check-xptifw - Run check-xptifw by default in GitHub Actions post-commit job - Fix whatever warnings the compiler complained about.
1 parent 1717a14 commit 183caf3

32 files changed

+342
-231
lines changed

.github/workflows/linux_post_commit.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ jobs:
7878
run: |
7979
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
8080
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
81+
- name: check-xptifw
82+
if: always()
83+
run: |
84+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
85+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-xptifw
8186
- name: Pack
8287
run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
8388
- name: Upload artifacts

buildbot/configure.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def do_configure(args):
4040
llvm_enable_lld = 'OFF'
4141

4242
sycl_enable_xpti_tracing = 'ON'
43+
xpti_enable_werror = 'ON'
4344

4445
if args.ci_defaults:
4546
print("#############################################")
@@ -79,6 +80,7 @@ def do_configure(args):
7980

8081
if args.no_werror:
8182
sycl_werror = 'OFF'
83+
xpti_enable_werror = 'OFF'
8284

8385
if args.no_assertions:
8486
llvm_enable_assertions = 'OFF'
@@ -123,7 +125,8 @@ def do_configure(args):
123125
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
124126
"-DSYCL_ENABLE_XPTI_TRACING={}".format(sycl_enable_xpti_tracing),
125127
"-DLLVM_ENABLE_LLD={}".format(llvm_enable_lld),
126-
"-DSYCL_BUILD_PI_ESIMD_CPU={}".format(sycl_build_pi_esimd_cpu)
128+
"-DSYCL_BUILD_PI_ESIMD_CPU={}".format(sycl_build_pi_esimd_cpu),
129+
"-DXPTI_ENABLE_WERROR={}".format(xpti_enable_werror)
127130
]
128131

129132
if args.l0_headers and args.l0_loader:

sycl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ if (NOT WIN32)
172172
endif()
173173

174174
if (SYCL_ENABLE_XPTI_TRACING)
175-
set(XPTIFW_LIBS xptifw)
175+
set(XPTIFW_LIBS xpti xptifw)
176176
endif()
177177

178178
# SYCL toolchain builds all components: compiler, libraries, headers, etc.

sycl/source/detail/event_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <chrono>
1919

2020
#ifdef XPTI_ENABLE_INSTRUMENTATION
21-
#include "xpti_trace_framework.hpp"
21+
#include "xpti/xpti_trace_framework.hpp"
2222
#include <atomic>
2323
#include <detail/xpti_registry.hpp>
2424
#include <sstream>

sycl/source/detail/pi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#ifdef XPTI_ENABLE_INSTRUMENTATION
3636
// Include the headers necessary for emitting
3737
// traces using the trace framework
38-
#include "xpti_trace_framework.h"
38+
#include "xpti/xpti_trace_framework.h"
3939
#endif
4040

4141
#define STR(x) #x

sycl/source/detail/plugin.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#ifdef XPTI_ENABLE_INSTRUMENTATION
2020
// Include the headers necessary for emitting traces using the trace framework
21-
#include "xpti_trace_framework.h"
21+
#include "xpti/xpti_trace_framework.h"
2222
#endif
2323

2424
__SYCL_INLINE_NAMESPACE(cl) {

sycl/source/detail/queue_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <utility>
1818

1919
#ifdef XPTI_ENABLE_INSTRUMENTATION
20-
#include "xpti_trace_framework.hpp"
20+
#include "xpti/xpti_trace_framework.hpp"
2121
#include <detail/xpti_registry.hpp>
2222
#include <sstream>
2323
#endif

sycl/source/detail/scheduler/commands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#endif
4444

4545
#ifdef XPTI_ENABLE_INSTRUMENTATION
46-
#include "xpti_trace_framework.hpp"
46+
#include "xpti/xpti_trace_framework.hpp"
4747
#include <detail/xpti_registry.hpp>
4848
#endif
4949

sycl/source/detail/xpti_registry.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#ifdef XPTI_ENABLE_INSTRUMENTATION
1515
// Include the headers necessary for emitting
1616
// traces using the trace framework
17-
#include "xpti_trace_framework.h"
17+
#include "xpti/xpti_trace_framework.h"
1818
#endif
1919

2020
__SYCL_INLINE_NAMESPACE(cl) {

sycl/tools/pi-trace/pi_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/// A sample XPTI subscriber to demonstrate how to collect PI function call
1111
/// arguments.
1212

13-
#include "xpti_trace_framework.h"
13+
#include "xpti/xpti_trace_framework.h"
1414

1515
#include "pi_arguments_handler.hpp"
1616

0 commit comments

Comments
 (0)