Skip to content

Commit f895300

Browse files
author
Colin Davidson
committed
debug remote hal
1 parent 9deca2d commit f895300

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

.github/actions/do_build_run_remote_hal/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ runs:
1414
- name : build client
1515
shell: bash
1616
run: |
17-
cmake -Bbuild_client -GNinja -DCA_MUX_TARGETS_TO_ENABLE="riscv" -DCA_RISCV_ENABLED=ON -DCA_LLVM_INSTALL_DIR=$GITHUB_WORKSPACE/llvm_install -DCA_CL_ENABLE_ICD_LOADER=ON -DCA_HAL_NAME=cpu_client
17+
cmake -Bbuild_client -GNinja -DCA_MUX_TARGETS_TO_ENABLE="riscv" -DCA_RISCV_ENABLED=ON -DCA_LLVM_INSTALL_DIR=$GITHUB_WORKSPACE/llvm_install -DCA_CL_ENABLE_ICD_LOADER=ON -DCA_HAL_NAME=cpu_client -DCA_CL_ENABLE_OFFLINE_KERNEL_TESTS=OFF
1818
ninja -Cbuild_client UnitCL
1919
- name : run remote_hal
2020
shell: bash
2121
run: |
2222
export HAL_REMOTE_PORT=9999
23+
export HAL_DEBUG_SERVER=1
2324
# Limit number of threads to 1 due to hal cpu use of temporary threads causing excessive qemu memory usage.
2425
export CA_CPU_HAL_NUM_THREADS=1
2526
export START_STRING="Listening on port $HAL_REMOTE_PORT"
@@ -38,6 +39,7 @@ runs:
3839
# Run client
3940
cd $GITHUB_WORKSPACE/build_client
4041
exitcode=0
42+
sleep 2
4143
OCL_ICD_FILENAMES=$PWD/lib/libCL.so.4.0 ./bin/UnitCL || exitcode=$?
4244
kill %1
4345
exit $exitcode

.github/workflows/planned_testing_caller.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ permissions:
8383
jobs:
8484
build_llvm_artefacts:
8585
name: Call PR testing on schedule
86-
if: inputs.build_llvm && inputs.ock
86+
if: inputs.build_llvm
87+
# && inputs.ock
8788
uses: ./.github/workflows/create_llvm_artefacts.yml
8889
secrets: inherit
8990
with:

.github/workflows/planned_testing_caller_20.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ jobs:
4141
# We can set ock, test_sycl_cts etc here optionally if this is used as a
4242
# pull request. Any parameters below this is intended for local testing
4343
# and should not be merged nor reviewed (other than checking it should not be merged).
44+
ock: false
45+
test_tornado: false
46+
test_sanitizers: false
47+
test_remote_hal: true
48+
test_sycl_cts: false
49+
test_sycl_e2e: false
50+
test_opencl_cts: false
51+
run_internal: false
52+
run_external: true
53+
target_list: '[ "host_x86_64_linux"]'
4454

4555
# This cleans up any caches which may have been created when running external tests
4656
clean_caches:

modules/compiler/loader/source/loader.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ cargo::expected<std::unique_ptr<Library>, std::string> loadLibrary() {
9191
// See
9292
// https://stackoverflow.com/questions/51209268/using-stdthread-in-a-library-loaded-with-dlopen-leads-to-a-sigsev
9393
handle->library = dlopen(library_name, RTLD_NOW | RTLD_GLOBAL);
94+
if (! handle->library) {
95+
(void)fprintf(stderr, "error: could not load '%s' : '%s'\n", library_name,
96+
dlerror());
97+
return nullptr;
98+
}
9499
#endif
95100

96101
if (!handle->library) {

0 commit comments

Comments
 (0)