From 3a58dffe000585c8b0e57cc1fda03d4d6f09fb59 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Sun, 9 Nov 2025 19:46:00 +0300 Subject: [PATCH 01/18] ci: add ci for self hosted runner --- .github/workflows/build.yml | 57 ++++++---------- .github/workflows/clang-format.yml | 11 +-- .github/workflows/deploy-test.yml | 10 ++- .github/workflows/deploy.yml | 8 +-- .github/workflows/self-hosted.yml | 106 +++++++++++++++++++++++++++++ .github/workflows/ubuntu.yml | 104 ++++++++++++++++++++++++++++ run_tests.py | 16 ++++- tests/CMakeLists.txt | 8 ++- tests/test_opencl.cpp | 55 ++++++++++++--- tests/test_opencl_merge.cpp | 24 +++++-- 10 files changed, 328 insertions(+), 71 deletions(-) create mode 100644 .github/workflows/self-hosted.yml create mode 100644 .github/workflows/ubuntu.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34cf397b9..fe87ad18b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,7 @@ on: - main - release - pre-release + - self-hosted-runner paths: - '.github/**' - 'deps/**' @@ -21,17 +22,16 @@ on: branches: [ main ] env: - build_dir: "build" + build-dir: "build" config: "Release" artifact: "native" nt: "4" jobs: - windows: - runs-on: windows-2019 + runs-on: windows-2022 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: true fetch-depth: 0 @@ -43,44 +43,22 @@ jobs: arch: amd64 - name: Configure CMake - run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} + run: | + cmake . -G Ninja -B ${{ env.build-dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DSPLA_BUILD_OPENCL=OFF - name: Build library sources - run: cmake --build ${{ env.build_dir }} + run: cmake --build ${{ env.build-dir }} --verbose -j ${{ env.nt }} - name: Upload binary uses: actions/upload-artifact@v4 with: name: windows-${{env.artifact}} - path: ${{env.build_dir}}/spla_x64.dll - - - ubuntu: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - with: - submodules: true - fetch-depth: 0 - - - uses: seanmiddleditch/gha-setup-ninja@master - - - name: Configure CMake - run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} - - - name: Build library sources - run: cmake --build ${{ env.build_dir }} - - - name: Upload binary - uses: actions/upload-artifact@v4 - with: - name: linux-${{env.artifact}} - path: ${{env.build_dir}}/libspla_x64.so + path: ${{env.build-dir}}/spla_x64.dll macos: runs-on: macos-14 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: true fetch-depth: 0 @@ -88,23 +66,28 @@ jobs: - uses: seanmiddleditch/gha-setup-ninja@master - name: Configure CMake x64 - run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCMAKE_OSX_ARCHITECTURES=x86_64 + run: cmake . -G Ninja -B ${{ env.build-dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCMAKE_OSX_ARCHITECTURES=x86_64 - name: Build library sources x64 - run: cmake --build ${{ env.build_dir }} + run: cmake --build ${{ env.build-dir }} - name: Configure CMake arm64 - run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCMAKE_OSX_ARCHITECTURES=arm64 + run: | + cmake . -G Ninja \ + -B ${{ env.build-dir }} \ + -DCMAKE_BUILD_TYPE=${{ env.config }} \ + -DCMAKE_OSX_ARCHITECTURES=arm64 \ + -DSPLA_BUILD_OPENCL=OFF env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} - name: Build library sources arm64 - run: cmake --build ${{ env.build_dir }} + run: cmake --build ${{ env.build-dir }} --verbose -j ${{ env.nt }} - name: Upload binary uses: actions/upload-artifact@v4 with: name: macos-${{env.artifact}} path: | - ${{env.build_dir}}/libspla_x64.dylib - ${{env.build_dir}}/libspla_arm64.dylib + ${{env.build-dir}}/libspla_x64.dylib + ${{env.build-dir}}/libspla_arm64.dylib \ No newline at end of file diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 61f697d55..628b814b5 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -2,7 +2,7 @@ name: Clang Format on: push: - branches: [ main ] + branches: [ main, self-hosted-runner ] paths: - '.github/**' - 'include/**' @@ -26,9 +26,10 @@ jobs: - 'tests' - 'examples' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 + - name: Run clang-format style check - uses: jidicula/clang-format-action@v4.10.1 + uses: jidicula/clang-format-action@v4.15.0 with: - clang-format-version: '15' - check-path: ${{ matrix.path }} + clang-format-version: '20' + check-path: ${{ matrix.path }} \ No newline at end of file diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index e22cd7855..c7f1ed82b 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -2,7 +2,7 @@ name: Python Package (Test) on: workflow_run: - workflows: [ "Build" ] + workflows: [ Build ] branches: [ "pre-release" ] types: - completed @@ -14,10 +14,8 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: '3.8' @@ -27,7 +25,7 @@ jobs: pip install setuptools wheel twine - name: Download artifact - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v5 with: workflow: build.yml workflow_conclusion: success @@ -42,4 +40,4 @@ jobs: run: | python setup.py sdist bdist_wheel twine upload --verbose --repository testpypi dist/* - working-directory: python + working-directory: python \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 026492987..d772c6fa5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,10 +14,10 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: '3.8' @@ -27,7 +27,7 @@ jobs: pip install setuptools wheel twine - name: Download artifact - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v5 with: workflow: build.yml workflow_conclusion: success @@ -42,4 +42,4 @@ jobs: run: | python setup.py sdist bdist_wheel twine upload --verbose dist/* - working-directory: python + working-directory: python \ No newline at end of file diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml new file mode 100644 index 000000000..1d6533175 --- /dev/null +++ b/.github/workflows/self-hosted.yml @@ -0,0 +1,106 @@ +name: Self-Hosted + +on: + push: + branches: + - main + - release + - pre-release + - self-hosted-runner + paths: + - '.github/**' + - 'deps/**' + - 'include/**' + - 'src/**' + - 'tests/**' + - 'examples/**' + - 'python/**' + - '.gitignore' + - '.gitmodules' + - 'CMakeLists.txt' + pull_request: + branches: [ main ] + +env: + build-dir: "build" + +jobs: + build: + name: Build ${{ matrix.os }} + runs-on: self-hosted + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + env: + config: "Release" + nt: "4" + + steps: + - uses: actions/checkout@v5 + with: + submodules: true + fetch-depth: 0 + + - name: Configure CMake + run: | + cmake . -G Ninja \ + -B ${{ env.build-dir }} \ + -DCMAKE_BUILD_TYPE=${{ env.config }} \ + -DSPLA_BUILD_TESTS=ON + + - name: Build library sources + run: | + cmake --build ${{ env.build-dir }} \ + --target all \ + --verbose \ + -j ${{ env.nt }} + + test: + name: Test GPU ${{ matrix.gpu }} + needs: build + runs-on: self-hosted + strategy: + fail-fast: false + matrix: + include: + - gpu: NVIDIA-GeForce-GT-1030 + platform: 2 + device: 0 + - gpu: AMD-Radeon-RX-6750-XT + platform: 1 + device: 0 + + env: + test-file: ${{ matrix.gpu }}_tests.log + + steps: + - name: Run tests + run: | + python3 ./run_tests.py --build-dir=${{ env.build-dir }} \ + --platform=${{ matrix.platform }} \ + --device=${{ matrix.device }} \ + | tee ${{ env.test-file }} + + - name: Upload tests resutls + uses: actions/upload-artifact@v4 + with: + name: ${{ env.test-file }} + path: ${{ env.test-file }} + + - name: Check for tests results + run: | + ! grep -q "FAILED" ${{ env.test-file }} + + clean: + name: Cleanup workspace + needs: test + if: always() + runs-on: self-hosted + + steps: + - name: Cleanup workspace + run: | + rm -rf ${{ github.workspace }}/* + rm -rf ${{ github.workspace }}/.* \ No newline at end of file diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 000000000..bac479e37 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,104 @@ +name: Ubuntu + +on: + push: + branches: + - main + - release + - pre-release + - self-hosted-runner + paths: + - '.github/**' + - 'deps/**' + - 'include/**' + - 'src/**' + - 'tests/**' + - 'examples/**' + - 'python/**' + - '.gitignore' + - '.gitmodules' + - 'CMakeLists.txt' + pull_request: + branches: [ main ] + +env: + build-dir: "build" + config: "Release" + artifact: "spla-ubuntu-build.tar.xz" + nt: "4" + +jobs: + ubuntu: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + with: + submodules: true + fetch-depth: 0 + + - uses: seanmiddleditch/gha-setup-ninja@master + + - name: Configure CMake + run: | + cmake . -G Ninja \ + -B ${{ env.build-dir }} \ + -DCMAKE_BUILD_TYPE=${{ env.config }} \ + -DSPLA_BUILD_TESTS=ON \ + -DSPLA_BUILD_OPENCL=OFF + + - name: Build library sources + run: | + cmake --build ${{ env.build-dir }} --verbose -j ${{ env.nt }} + + - name: Prepare upload binary + run: | + tar cfz ${{ env.artifact }} ${{ env.build-dir }} + + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: ${{env.artifact}} + path: ${{env.artifact}} + + test: + name: Test CPU ${{ matrix.cpu }} + needs: ubuntu + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + cpu: AMD-EPYC-7763 + + env: + test-file: cpu_tests.log + + steps: + - uses: actions/checkout@v5 + with: + submodules: true + fetch-depth: 0 + + - uses: actions/download-artifact@v5 + with: + name: ${{ env.artifact }} + + - name: Unarchive artifact + run: | + tar xzf ${{ env.artifact }} + rm ${{ env.artifact }} + + - name: Run tests + run: | + python3 ./run_tests.py --build-dir=${{ env.build-dir }} | tee ${{ env.test-file }} + + - name: Upload tests resutls + uses: actions/upload-artifact@v4 + with: + name: ${{ env.test-file }} + path: ${{ env.test-file }} + + - name: Check for tests results + run: | + ! grep -q "FAILED" ${{ env.test-file }} \ No newline at end of file diff --git a/run_tests.py b/run_tests.py index ad738fdea..ca1e1b5f0 100644 --- a/run_tests.py +++ b/run_tests.py @@ -29,6 +29,7 @@ import argparse import subprocess import re +import os def test_names(test_src_path): @@ -41,18 +42,27 @@ def test_names(test_src_path): def main(): parser = argparse.ArgumentParser() parser.add_argument("--build-dir", default="build") + parser.add_argument("--platform", default="0") + parser.add_argument("--device", default="0") args = parser.parse_args() + os.environ["SPLA_OPENCL_PLATFORM"] = args.platform + os.environ["SPLA_OPENCL_DEVICE"] = args.device + tests_dir = shared.ROOT / args.build_dir / "tests" print(f"Searching for unit-tests in `{tests_dir}` folder") failed_tests = [] + skipped_tests = [] all_tests = test_names(shared.ROOT / "tests") for test_name in all_tests: full_test_name = str(tests_dir / test_name) print(f"Exec unit-test: `{full_test_name}`") try: subprocess.check_call(full_test_name) + except FileNotFoundError: + skipped_tests.append(test_name) + print(f"Skipped: `{test_name}`") except subprocess.CalledProcessError as err: failed_tests.append(test_name) print(f"Failed: `{err.output}`") @@ -60,10 +70,14 @@ def main(): all_tests_string = '\n\t'.join(all_tests) print(f"All executed tests: \n\t{all_tests_string}") + if skipped_tests: + skipped_tests_string = '\n\t'.join(skipped_tests) + print(f"Skipped tests: \n\t{skipped_tests_string}") + if failed_tests: failed_tests_string = '\n\t'.join(failed_tests) raise Exception(f"Some tests have not been passed: \n\t{failed_tests_string}") if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d642b2fe0..e20657a89 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -15,7 +15,9 @@ spla_test_target(test_mxmT) spla_test_target(test_mxv) spla_test_target(test_vxm) spla_test_target(test_op) -spla_test_target(test_opencl) -spla_test_target(test_opencl_merge) +if (SPLA_BUILD_OPENCL) + spla_test_target(test_opencl) + spla_test_target(test_opencl_merge) +endif () spla_test_target(test_schedule) -spla_test_target(test_vector) +spla_test_target(test_vector) \ No newline at end of file diff --git a/tests/test_opencl.cpp b/tests/test_opencl.cpp index 7b8d6a384..74c8c0bb0 100644 --- a/tests/test_opencl.cpp +++ b/tests/test_opencl.cpp @@ -44,14 +44,21 @@ TEST(opencl, basic) { if (platforms.empty()) { GTEST_SKIP() << "No platforms found"; } - cl::Platform platform = platforms.front(); + + const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + + cl::Platform platform = platforms[platform_index]; std::vector devices; platform.getDevices(CL_DEVICE_TYPE_ALL, &devices); if (devices.empty()) { GTEST_SKIP() << "No devices found"; } - cl::Device device = devices.front(); + + const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context); @@ -97,14 +104,21 @@ TEST(opencl, bitonic_sort_local) { if (platforms.empty()) { GTEST_SKIP() << "No platforms found"; } - cl::Platform platform = platforms.front(); + + const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + + cl::Platform platform = platforms[platform_index]; std::vector devices; platform.getDevices(CL_DEVICE_TYPE_ALL, &devices); if (devices.empty()) { GTEST_SKIP() << "No devices found"; } - cl::Device device = devices.front(); + + const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context); @@ -153,14 +167,21 @@ TEST(opencl, bitonic_sort_global) { if (platforms.empty()) { GTEST_SKIP() << "No platforms found"; } - cl::Platform platform = platforms.front(); + + const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + + cl::Platform platform = platforms[platform_index]; std::vector devices; platform.getDevices(CL_DEVICE_TYPE_ALL, &devices); if (devices.empty()) { GTEST_SKIP() << "No devices found"; } - cl::Device device = devices.front(); + + const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context); @@ -210,14 +231,21 @@ TEST(opencl, custom_value) { if (platforms.empty()) { GTEST_SKIP() << "No platforms found"; } - cl::Platform platform = platforms.front(); + + const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + + cl::Platform platform = platforms[platform_index]; std::vector devices; platform.getDevices(CL_DEVICE_TYPE_ALL, &devices); if (devices.empty()) { GTEST_SKIP() << "No devices found"; } - cl::Device device = devices.front(); + + const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context); @@ -264,14 +292,21 @@ TEST(opencl, reduce_by_key_small) { if (platforms.empty()) { GTEST_SKIP() << "No platforms found"; } - cl::Platform platform = platforms.front(); + + const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + + cl::Platform platform = platforms[platform_index]; std::vector devices; platform.getDevices(CL_DEVICE_TYPE_ALL, &devices); if (devices.empty()) { GTEST_SKIP() << "No devices found"; } - cl::Device device = devices.front(); + + const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context, CL_QUEUE_PROFILING_ENABLE); diff --git a/tests/test_opencl_merge.cpp b/tests/test_opencl_merge.cpp index 9761de9aa..005bc5196 100644 --- a/tests/test_opencl_merge.cpp +++ b/tests/test_opencl_merge.cpp @@ -415,7 +415,11 @@ TEST(opencl_merge, merge_path_v1) { if (platforms.empty()) { GTEST_SKIP() << "No platforms found"; } - cl::Platform platform = platforms.back(); + + const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + + cl::Platform platform = platforms[platform_index]; std::cout << "Platforms: " << std::endl; for (auto& it : platforms) { @@ -429,7 +433,10 @@ TEST(opencl_merge, merge_path_v1) { if (devices.empty()) { GTEST_SKIP() << "No devices found"; } - cl::Device device = devices[0]; + + const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; std::cout << "Devices: " << std::endl; for (auto& it : devices) { @@ -511,7 +518,11 @@ TEST(opencl_merge, merge_path_v2) { if (platforms.empty()) { GTEST_SKIP() << "No platforms found"; } - cl::Platform platform = platforms.back(); + + const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + + cl::Platform platform = platforms[platform_index]; std::cout << "Platforms: " << std::endl; for (auto& it : platforms) { @@ -525,7 +536,10 @@ TEST(opencl_merge, merge_path_v2) { if (devices.empty()) { GTEST_SKIP() << "No devices found"; } - cl::Device device = devices[0]; + + const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; std::cout << "Devices: " << std::endl; for (auto& it : devices) { @@ -602,4 +616,4 @@ TEST(opencl_merge, merge_path_v2) { std::cout << "Time taken for Merge Cpu: " << (result_time_cpu / N_RUNS).count() << " ms\n"; } -SPLA_GTEST_MAIN +SPLA_GTEST_MAIN \ No newline at end of file From 308b51abf37335ab51c6c196b3f1e6680abdabe0 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Sun, 9 Nov 2025 20:19:08 +0300 Subject: [PATCH 02/18] style: changes accoeding to clang formatter --- run_tests.py | 4 ++-- src/opencl/cl_accelerator.cpp | 9 +++++++-- tests/test_opencl.cpp | 30 +++++++++++++++--------------- tests/test_opencl_merge.cpp | 12 ++++++------ 4 files changed, 30 insertions(+), 25 deletions(-) diff --git a/run_tests.py b/run_tests.py index ca1e1b5f0..c569dd6db 100644 --- a/run_tests.py +++ b/run_tests.py @@ -57,12 +57,12 @@ def main(): all_tests = test_names(shared.ROOT / "tests") for test_name in all_tests: full_test_name = str(tests_dir / test_name) - print(f"Exec unit-test: `{full_test_name}`") try: subprocess.check_call(full_test_name) + print(f"Exec unit-test: `{full_test_name}`") except FileNotFoundError: skipped_tests.append(test_name) - print(f"Skipped: `{test_name}`") + print(f"Skipped: `{full_test_name}`") except subprocess.CalledProcessError as err: failed_tests.append(test_name) print(f"Failed: `{err.output}`") diff --git a/src/opencl/cl_accelerator.cpp b/src/opencl/cl_accelerator.cpp index 6c3d588b3..e0350b4b9 100644 --- a/src/opencl/cl_accelerator.cpp +++ b/src/opencl/cl_accelerator.cpp @@ -42,10 +42,15 @@ namespace spla { Status CLAccelerator::init() { m_description = "no platform or device"; - if (set_platform(0) != Status::Ok) + const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + + if (set_platform(platform_index) != Status::Ok) return Status::PlatformNotFound; - if (set_device(0) != Status::Ok) + if (set_device(device_index) != Status::Ok) return Status::DeviceNotFound; if (set_queues_count(1) != Status::Ok) diff --git a/tests/test_opencl.cpp b/tests/test_opencl.cpp index 74c8c0bb0..7e46a3314 100644 --- a/tests/test_opencl.cpp +++ b/tests/test_opencl.cpp @@ -46,7 +46,7 @@ TEST(opencl, basic) { } const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); - int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -57,8 +57,8 @@ TEST(opencl, basic) { } const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); - int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); - cl::Device device = devices[device_index]; + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context); @@ -106,7 +106,7 @@ TEST(opencl, bitonic_sort_local) { } const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); - int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -117,8 +117,8 @@ TEST(opencl, bitonic_sort_local) { } const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); - int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); - cl::Device device = devices[device_index]; + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context); @@ -169,7 +169,7 @@ TEST(opencl, bitonic_sort_global) { } const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); - int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -180,8 +180,8 @@ TEST(opencl, bitonic_sort_global) { } const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); - int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); - cl::Device device = devices[device_index]; + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context); @@ -233,7 +233,7 @@ TEST(opencl, custom_value) { } const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); - int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -244,8 +244,8 @@ TEST(opencl, custom_value) { } const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); - int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); - cl::Device device = devices[device_index]; + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context); @@ -294,7 +294,7 @@ TEST(opencl, reduce_by_key_small) { } const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); - int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -305,8 +305,8 @@ TEST(opencl, reduce_by_key_small) { } const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); - int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); - cl::Device device = devices[device_index]; + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; cl::Context context(device); cl::CommandQueue queue(context, CL_QUEUE_PROFILING_ENABLE); diff --git a/tests/test_opencl_merge.cpp b/tests/test_opencl_merge.cpp index 005bc5196..8c879a83f 100644 --- a/tests/test_opencl_merge.cpp +++ b/tests/test_opencl_merge.cpp @@ -417,7 +417,7 @@ TEST(opencl_merge, merge_path_v1) { } const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); - int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -435,8 +435,8 @@ TEST(opencl_merge, merge_path_v1) { } const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); - int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); - cl::Device device = devices[device_index]; + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; std::cout << "Devices: " << std::endl; for (auto& it : devices) { @@ -520,7 +520,7 @@ TEST(opencl_merge, merge_path_v2) { } const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); - int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -538,8 +538,8 @@ TEST(opencl_merge, merge_path_v2) { } const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); - int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); - cl::Device device = devices[device_index]; + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + cl::Device device = devices[device_index]; std::cout << "Devices: " << std::endl; for (auto& it : devices) { From c99f9cdb2ea6f2fd99776f1e9e33d4f5bd0855bf Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Sun, 9 Nov 2025 20:52:16 +0300 Subject: [PATCH 03/18] test: add intel gpu --- .github/workflows/self-hosted.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml index 1d6533175..ebcf0d0b5 100644 --- a/.github/workflows/self-hosted.yml +++ b/.github/workflows/self-hosted.yml @@ -71,6 +71,9 @@ jobs: - gpu: AMD-Radeon-RX-6750-XT platform: 1 device: 0 + - gpu: Intel-Core-i7-4790 + platform: 0 + device: 0 env: test-file: ${{ matrix.gpu }}_tests.log From 0f290b8cfc0791cb5ea7842d39fb30526ed1799d Mon Sep 17 00:00:00 2001 From: Kostya Date: Mon, 10 Nov 2025 12:10:40 +0300 Subject: [PATCH 04/18] fix: change vendor id for pocl --- src/opencl/cl_accelerator.cpp | 2 +- src/opencl/cl_accelerator.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/opencl/cl_accelerator.cpp b/src/opencl/cl_accelerator.cpp index e0350b4b9..7bbe7226e 100644 --- a/src/opencl/cl_accelerator.cpp +++ b/src/opencl/cl_accelerator.cpp @@ -118,7 +118,7 @@ namespace spla { auto dev_type = m_device.getInfo(); - if (m_vendor_id == 0x10006 && + if (m_vendor_id == 65538 && dev_type == CL_DEVICE_TYPE_CPU) { m_vendor_code = VENDOR_CODE_POCL_CPU; m_default_wgs = 64; diff --git a/src/opencl/cl_accelerator.hpp b/src/opencl/cl_accelerator.hpp index d9741d1f9..979f95d21 100644 --- a/src/opencl/cl_accelerator.hpp +++ b/src/opencl/cl_accelerator.hpp @@ -99,6 +99,7 @@ namespace spla { [[nodiscard]] bool is_amd() const { return m_is_amd; } [[nodiscard]] bool is_intel() const { return m_is_intel; } [[nodiscard]] bool is_img() const { return m_is_img; } + [[nodiscard]] bool is_pocl() const { return m_is_pocl; } private: cl::Platform m_platform; From 43433c33cfc5aa5fa0c5adeb4a269e48a941af78 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Mon, 10 Nov 2025 14:49:31 +0300 Subject: [PATCH 05/18] ref: changes in env variable name --- run_tests.py | 7 +++++-- src/opencl/cl_accelerator.cpp | 11 ++++++++--- src/opencl/cl_accelerator.hpp | 3 +++ tests/test_kron.cpp | 2 +- tests/test_mxm.cpp | 2 +- tests/test_mxmT.cpp | 2 +- tests/test_mxv.cpp | 2 +- tests/test_opencl.cpp | 22 ++++++++++++---------- tests/test_opencl_merge.cpp | 10 ++++++---- tests/test_vector.cpp | 2 +- tests/test_vxm.cpp | 2 +- 11 files changed, 40 insertions(+), 25 deletions(-) diff --git a/run_tests.py b/run_tests.py index c569dd6db..0e8befbc2 100644 --- a/run_tests.py +++ b/run_tests.py @@ -46,8 +46,11 @@ def main(): parser.add_argument("--device", default="0") args = parser.parse_args() - os.environ["SPLA_OPENCL_PLATFORM"] = args.platform - os.environ["SPLA_OPENCL_DEVICE"] = args.device + spla_opencl_platform = "SPLA_OPENCL_PLATFORM" + spla_opencl_device = "SPLA_OPENCL_DEVICE" + + os.environ[spla_opencl_platform] = args.platform + os.environ[spla_opencl_device] = args.device tests_dir = shared.ROOT / args.build_dir / "tests" print(f"Searching for unit-tests in `{tests_dir}` folder") diff --git a/src/opencl/cl_accelerator.cpp b/src/opencl/cl_accelerator.cpp index 7bbe7226e..776f65d03 100644 --- a/src/opencl/cl_accelerator.cpp +++ b/src/opencl/cl_accelerator.cpp @@ -42,8 +42,8 @@ namespace spla { Status CLAccelerator::init() { m_description = "no platform or device"; - const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); - const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); @@ -117,8 +117,13 @@ namespace spla { m_is_img = false; auto dev_type = m_device.getInfo(); + auto m_platform_name = m_platform.getInfo(); - if (m_vendor_id == 65538 && + if ((m_vendor_id == 65538 || + m_vendor_name.find("pocl") != std::string::npos || + m_vendor_name.find("POCL") != std::string::npos || + m_vendor_name.find("PoCL") != std::string::npos || + m_platform_name.find("Portable Computing Language") != std::string::npos) && dev_type == CL_DEVICE_TYPE_CPU) { m_vendor_code = VENDOR_CODE_POCL_CPU; m_default_wgs = 64; diff --git a/src/opencl/cl_accelerator.hpp b/src/opencl/cl_accelerator.hpp index 979f95d21..32ae44871 100644 --- a/src/opencl/cl_accelerator.hpp +++ b/src/opencl/cl_accelerator.hpp @@ -52,6 +52,9 @@ #define VENDOR_CODE_IMG "img" #define VENDOR_CODE_POCL_CPU "pocl_cpu" +#define SPLA_OPENCL_PLATFORM "SPLA_OPENCL_PLATFORM" +#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" + namespace spla { /** diff --git a/tests/test_kron.cpp b/tests/test_kron.cpp index 22040d795..e0839b605 100644 --- a/tests/test_kron.cpp +++ b/tests/test_kron.cpp @@ -92,4 +92,4 @@ TEST(kron, naive) { } } -SPLA_GTEST_MAIN_WITH_FINALIZE_PLATFORM(1) +SPLA_GTEST_MAIN diff --git a/tests/test_mxm.cpp b/tests/test_mxm.cpp index 879415cd4..b727975ab 100644 --- a/tests/test_mxm.cpp +++ b/tests/test_mxm.cpp @@ -129,4 +129,4 @@ TEST(mxm, perf_zero) { } } -SPLA_GTEST_MAIN_WITH_FINALIZE_PLATFORM(1) +SPLA_GTEST_MAIN diff --git a/tests/test_mxmT.cpp b/tests/test_mxmT.cpp index 64c05b6dc..fbec06677 100644 --- a/tests/test_mxmT.cpp +++ b/tests/test_mxmT.cpp @@ -140,4 +140,4 @@ TEST(mxmT_masked, perf_zero) { } -SPLA_GTEST_MAIN_WITH_FINALIZE_PLATFORM(1) \ No newline at end of file +SPLA_GTEST_MAIN \ No newline at end of file diff --git a/tests/test_mxv.cpp b/tests/test_mxv.cpp index 9c1c6de29..21e6f4877 100644 --- a/tests/test_mxv.cpp +++ b/tests/test_mxv.cpp @@ -129,4 +129,4 @@ TEST(mxv_masked, perf) { std::cout << std::endl; } -SPLA_GTEST_MAIN_WITH_FINALIZE_PLATFORM(1) \ No newline at end of file +SPLA_GTEST_MAIN \ No newline at end of file diff --git a/tests/test_opencl.cpp b/tests/test_opencl.cpp index 7e46a3314..6f498a8f9 100644 --- a/tests/test_opencl.cpp +++ b/tests/test_opencl.cpp @@ -31,6 +31,8 @@ #define CL_HPP_MINIMUM_OPENCL_VERSION 120 #define CL_HPP_TARGET_OPENCL_VERSION 120 #define CL_HPP_ENABLE_EXCEPTIONS +#define SPLA_OPENCL_PLATFORM "SPLA_OPENCL_PLATFORM" +#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" #include #include @@ -45,7 +47,7 @@ TEST(opencl, basic) { GTEST_SKIP() << "No platforms found"; } - const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -56,7 +58,7 @@ TEST(opencl, basic) { GTEST_SKIP() << "No devices found"; } - const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); cl::Device device = devices[device_index]; @@ -105,7 +107,7 @@ TEST(opencl, bitonic_sort_local) { GTEST_SKIP() << "No platforms found"; } - const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -116,7 +118,7 @@ TEST(opencl, bitonic_sort_local) { GTEST_SKIP() << "No devices found"; } - const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); cl::Device device = devices[device_index]; @@ -168,7 +170,7 @@ TEST(opencl, bitonic_sort_global) { GTEST_SKIP() << "No platforms found"; } - const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -179,7 +181,7 @@ TEST(opencl, bitonic_sort_global) { GTEST_SKIP() << "No devices found"; } - const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); cl::Device device = devices[device_index]; @@ -232,7 +234,7 @@ TEST(opencl, custom_value) { GTEST_SKIP() << "No platforms found"; } - const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -243,7 +245,7 @@ TEST(opencl, custom_value) { GTEST_SKIP() << "No devices found"; } - const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); cl::Device device = devices[device_index]; @@ -293,7 +295,7 @@ TEST(opencl, reduce_by_key_small) { GTEST_SKIP() << "No platforms found"; } - const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -304,7 +306,7 @@ TEST(opencl, reduce_by_key_small) { GTEST_SKIP() << "No devices found"; } - const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); cl::Device device = devices[device_index]; diff --git a/tests/test_opencl_merge.cpp b/tests/test_opencl_merge.cpp index 8c879a83f..2ba2f21e1 100644 --- a/tests/test_opencl_merge.cpp +++ b/tests/test_opencl_merge.cpp @@ -30,6 +30,8 @@ #define CL_HPP_MINIMUM_OPENCL_VERSION 120 #define CL_HPP_TARGET_OPENCL_VERSION 120 #define CL_HPP_ENABLE_EXCEPTIONS +#define SPLA_OPENCL_PLATFORM "SPLA_OPENCL_PLATFORM" +#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" #include #include @@ -416,7 +418,7 @@ TEST(opencl_merge, merge_path_v1) { GTEST_SKIP() << "No platforms found"; } - const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -434,7 +436,7 @@ TEST(opencl_merge, merge_path_v1) { GTEST_SKIP() << "No devices found"; } - const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); cl::Device device = devices[device_index]; @@ -519,7 +521,7 @@ TEST(opencl_merge, merge_path_v2) { GTEST_SKIP() << "No platforms found"; } - const char* spla_opencl_platform = std::getenv("SPLA_OPENCL_PLATFORM"); + const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); cl::Platform platform = platforms[platform_index]; @@ -537,7 +539,7 @@ TEST(opencl_merge, merge_path_v2) { GTEST_SKIP() << "No devices found"; } - const char* spla_opencl_device = std::getenv("SPLA_OPENCL_DEVICE"); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); cl::Device device = devices[device_index]; diff --git a/tests/test_vector.cpp b/tests/test_vector.cpp index 22763c5a2..4bd310b43 100644 --- a/tests/test_vector.cpp +++ b/tests/test_vector.cpp @@ -497,4 +497,4 @@ TEST(vector, map) { } } -SPLA_GTEST_MAIN_WITH_FINALIZE_PLATFORM(1) +SPLA_GTEST_MAIN diff --git a/tests/test_vxm.cpp b/tests/test_vxm.cpp index 14394b55c..58c31e55c 100644 --- a/tests/test_vxm.cpp +++ b/tests/test_vxm.cpp @@ -186,4 +186,4 @@ TEST(vxm_masked, perf_and_or) { std::cout << std::endl; } -SPLA_GTEST_MAIN_WITH_FINALIZE_PLATFORM(1) \ No newline at end of file +SPLA_GTEST_MAIN \ No newline at end of file From 9760dc10eb1d108e9c25d8d8695ea31495ce8e7c Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Mon, 10 Nov 2025 15:02:49 +0300 Subject: [PATCH 06/18] style: changes according to clang formatter --- .github/workflows/deploy.yml | 2 +- .github/workflows/docs-cpp.yml | 6 +++--- .github/workflows/docs-python.yml | 8 ++++---- src/opencl/cl_accelerator.cpp | 16 ++++++++-------- src/opencl/cl_accelerator.hpp | 2 +- tests/test_opencl.cpp | 2 +- tests/test_opencl_merge.cpp | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d772c6fa5..0cc6b6879 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.8' + python-version: '3.12.5' - name: Install dependencies run: | diff --git a/.github/workflows/docs-cpp.yml b/.github/workflows/docs-cpp.yml index bd557537f..f89432a91 100644 --- a/.github/workflows/docs-cpp.yml +++ b/.github/workflows/docs-cpp.yml @@ -17,13 +17,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Generate documentation - uses: mattnotmitt/doxygen-action@v1.3.1 + uses: mattnotmitt/doxygen-action@v1.12.0 - name: Publish to Github Pages - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./html/ diff --git a/.github/workflows/docs-python.yml b/.github/workflows/docs-python.yml index 5a288db1e..6c0130487 100644 --- a/.github/workflows/docs-python.yml +++ b/.github/workflows/docs-python.yml @@ -14,12 +14,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.8 ] + python-version: [ 3.12.5 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -32,7 +32,7 @@ jobs: SPLA_DOCS: true - name: Publish to Github Pages - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./pydocs/ diff --git a/src/opencl/cl_accelerator.cpp b/src/opencl/cl_accelerator.cpp index 776f65d03..70620d8e4 100644 --- a/src/opencl/cl_accelerator.cpp +++ b/src/opencl/cl_accelerator.cpp @@ -43,9 +43,9 @@ namespace spla { m_description = "no platform or device"; const char* spla_opencl_platform = std::getenv(SPLA_OPENCL_PLATFORM); - const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); - int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); - int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); + const char* spla_opencl_device = std::getenv(SPLA_OPENCL_DEVICE); + int platform_index = (spla_opencl_platform ? std::atoi(spla_opencl_platform) : 0); + int device_index = (spla_opencl_device ? std::atoi(spla_opencl_device) : 0); if (set_platform(platform_index) != Status::Ok) return Status::PlatformNotFound; @@ -116,14 +116,14 @@ namespace spla { m_is_intel = false; m_is_img = false; - auto dev_type = m_device.getInfo(); + auto dev_type = m_device.getInfo(); auto m_platform_name = m_platform.getInfo(); if ((m_vendor_id == 65538 || - m_vendor_name.find("pocl") != std::string::npos || - m_vendor_name.find("POCL") != std::string::npos || - m_vendor_name.find("PoCL") != std::string::npos || - m_platform_name.find("Portable Computing Language") != std::string::npos) && + m_vendor_name.find("pocl") != std::string::npos || + m_vendor_name.find("POCL") != std::string::npos || + m_vendor_name.find("PoCL") != std::string::npos || + m_platform_name.find("Portable Computing Language") != std::string::npos) && dev_type == CL_DEVICE_TYPE_CPU) { m_vendor_code = VENDOR_CODE_POCL_CPU; m_default_wgs = 64; diff --git a/src/opencl/cl_accelerator.hpp b/src/opencl/cl_accelerator.hpp index 32ae44871..d809398c3 100644 --- a/src/opencl/cl_accelerator.hpp +++ b/src/opencl/cl_accelerator.hpp @@ -53,7 +53,7 @@ #define VENDOR_CODE_POCL_CPU "pocl_cpu" #define SPLA_OPENCL_PLATFORM "SPLA_OPENCL_PLATFORM" -#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" +#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" namespace spla { diff --git a/tests/test_opencl.cpp b/tests/test_opencl.cpp index 6f498a8f9..14d0799a5 100644 --- a/tests/test_opencl.cpp +++ b/tests/test_opencl.cpp @@ -32,7 +32,7 @@ #define CL_HPP_TARGET_OPENCL_VERSION 120 #define CL_HPP_ENABLE_EXCEPTIONS #define SPLA_OPENCL_PLATFORM "SPLA_OPENCL_PLATFORM" -#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" +#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" #include #include diff --git a/tests/test_opencl_merge.cpp b/tests/test_opencl_merge.cpp index 2ba2f21e1..2716d1964 100644 --- a/tests/test_opencl_merge.cpp +++ b/tests/test_opencl_merge.cpp @@ -31,7 +31,7 @@ #define CL_HPP_TARGET_OPENCL_VERSION 120 #define CL_HPP_ENABLE_EXCEPTIONS #define SPLA_OPENCL_PLATFORM "SPLA_OPENCL_PLATFORM" -#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" +#define SPLA_OPENCL_DEVICE "SPLA_OPENCL_DEVICE" #include #include From a48d7c30d6a25ac2f15778b6b5615815227d54d2 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Mon, 10 Nov 2025 15:24:15 +0300 Subject: [PATCH 07/18] test: run in debug mode --- .github/workflows/self-hosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml index ebcf0d0b5..0de9843fa 100644 --- a/.github/workflows/self-hosted.yml +++ b/.github/workflows/self-hosted.yml @@ -34,7 +34,7 @@ jobs: include: - os: ubuntu-24.04 env: - config: "Release" + config: "Debug" nt: "4" steps: From 844308518120ccc8b47e8bf22f75d0dd42552632 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Mon, 10 Nov 2025 15:45:54 +0300 Subject: [PATCH 08/18] ci: run all in debug mode --- .github/workflows/build.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe87ad18b..65024d043 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ on: env: build-dir: "build" - config: "Release" + config: "Debug" artifact: "native" nt: "4" diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bac479e37..4a0d8c08b 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -23,7 +23,7 @@ on: env: build-dir: "build" - config: "Release" + config: "Debug" artifact: "spla-ubuntu-build.tar.xz" nt: "4" From dc8548c1f0a81f37cd1eb8ff7d5b4104944eed56 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Mon, 10 Nov 2025 15:47:09 +0300 Subject: [PATCH 09/18] ci: delete trigger branch --- .github/workflows/build.yml | 1 - .github/workflows/clang-format.yml | 2 +- .github/workflows/self-hosted.yml | 1 - .github/workflows/ubuntu.yml | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65024d043..5b489990d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,6 @@ on: - main - release - pre-release - - self-hosted-runner paths: - '.github/**' - 'deps/**' diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 628b814b5..77c7dc77f 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -2,7 +2,7 @@ name: Clang Format on: push: - branches: [ main, self-hosted-runner ] + branches: [ main ] paths: - '.github/**' - 'include/**' diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml index 0de9843fa..bb7e21da4 100644 --- a/.github/workflows/self-hosted.yml +++ b/.github/workflows/self-hosted.yml @@ -6,7 +6,6 @@ on: - main - release - pre-release - - self-hosted-runner paths: - '.github/**' - 'deps/**' diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4a0d8c08b..b8de9b6b7 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -6,7 +6,6 @@ on: - main - release - pre-release - - self-hosted-runner paths: - '.github/**' - 'deps/**' From e2100a5644022b2337d5f1166185725aa5d999e7 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Mon, 10 Nov 2025 16:32:51 +0300 Subject: [PATCH 10/18] ref: change name of job in ubuntu --- .github/workflows/ubuntu.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index b8de9b6b7..9597348d6 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -27,8 +27,14 @@ env: nt: "4" jobs: - ubuntu: - runs-on: ubuntu-24.04 + build: + name: Build ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 steps: - uses: actions/checkout@v5 with: From 2c539651174366f720e749541e72c45a3d3705aa Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Mon, 10 Nov 2025 16:33:44 +0300 Subject: [PATCH 11/18] fix: add correct job name --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 9597348d6..42eaab0a2 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -67,7 +67,7 @@ jobs: test: name: Test CPU ${{ matrix.cpu }} - needs: ubuntu + needs: build runs-on: ${{ matrix.os }} strategy: fail-fast: false From 4819db1a113e89d579bfae42218d874849a6fbed Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Wed, 12 Nov 2025 20:38:00 +0300 Subject: [PATCH 12/18] ci: run github hosted runners in release mode --- .github/workflows/build.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b489990d..633e22470 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ on: env: build-dir: "build" - config: "Debug" + config: "Release" artifact: "native" nt: "4" diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 42eaab0a2..02f756a8b 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -22,7 +22,7 @@ on: env: build-dir: "build" - config: "Debug" + config: "Release" artifact: "spla-ubuntu-build.tar.xz" nt: "4" From c4ba8a6517296aa7f6a17f2a743a553be1c500b5 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Wed, 12 Nov 2025 20:40:09 +0300 Subject: [PATCH 13/18] style: add newlines in the end of files --- .github/workflows/build.yml | 2 +- .github/workflows/clang-format.yml | 2 +- .github/workflows/deploy-test.yml | 2 +- .github/workflows/deploy.yml | 2 +- .github/workflows/docs-python.yml | 2 +- .github/workflows/self-hosted.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 633e22470..58534199a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,4 +89,4 @@ jobs: name: macos-${{env.artifact}} path: | ${{env.build-dir}}/libspla_x64.dylib - ${{env.build-dir}}/libspla_arm64.dylib \ No newline at end of file + ${{env.build-dir}}/libspla_arm64.dylib diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 77c7dc77f..76e2c460d 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -32,4 +32,4 @@ jobs: uses: jidicula/clang-format-action@v4.15.0 with: clang-format-version: '20' - check-path: ${{ matrix.path }} \ No newline at end of file + check-path: ${{ matrix.path }} diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index c7f1ed82b..ae0c00869 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -40,4 +40,4 @@ jobs: run: | python setup.py sdist bdist_wheel twine upload --verbose --repository testpypi dist/* - working-directory: python \ No newline at end of file + working-directory: python diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0cc6b6879..a689e31d0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -42,4 +42,4 @@ jobs: run: | python setup.py sdist bdist_wheel twine upload --verbose dist/* - working-directory: python \ No newline at end of file + working-directory: python diff --git a/.github/workflows/docs-python.yml b/.github/workflows/docs-python.yml index 6c0130487..26782bd6d 100644 --- a/.github/workflows/docs-python.yml +++ b/.github/workflows/docs-python.yml @@ -36,4 +36,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./pydocs/ - destination_dir: docs-python \ No newline at end of file + destination_dir: docs-python diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml index bb7e21da4..65921b865 100644 --- a/.github/workflows/self-hosted.yml +++ b/.github/workflows/self-hosted.yml @@ -105,4 +105,4 @@ jobs: - name: Cleanup workspace run: | rm -rf ${{ github.workspace }}/* - rm -rf ${{ github.workspace }}/.* \ No newline at end of file + rm -rf ${{ github.workspace }}/.* diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 02f756a8b..61ba467c3 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -106,4 +106,4 @@ jobs: - name: Check for tests results run: | - ! grep -q "FAILED" ${{ env.test-file }} \ No newline at end of file + ! grep -q "FAILED" ${{ env.test-file }} From 47952e277c9f71fad8edf36394d5ce0cfce43bde Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Wed, 12 Nov 2025 22:08:45 +0300 Subject: [PATCH 14/18] fix: change type to cpu --- .github/workflows/self-hosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml index 65921b865..186e47cbf 100644 --- a/.github/workflows/self-hosted.yml +++ b/.github/workflows/self-hosted.yml @@ -33,7 +33,7 @@ jobs: include: - os: ubuntu-24.04 env: - config: "Debug" + config: "Release" nt: "4" steps: From e91f536b697a46543eca7e7ea5443b90c0c13491 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Sat, 15 Nov 2025 05:37:25 +0300 Subject: [PATCH 15/18] fix: change number --- tests/test_mxv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_mxv.cpp b/tests/test_mxv.cpp index 21e6f4877..b9f3d5843 100644 --- a/tests/test_mxv.cpp +++ b/tests/test_mxv.cpp @@ -89,7 +89,7 @@ TEST(mxv_masked, naive) { } TEST(mxv_masked, perf) { - const int N = 1000000; + const int N = 980000; const int K = 256; const int S = 10; const int NITER = 10; From 43814d4828fbbab442349207ae2a2bed151b7b20 Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Sat, 15 Nov 2025 05:45:30 +0300 Subject: [PATCH 16/18] ci: add check for failed in all cases --- .github/workflows/self-hosted.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml index 186e47cbf..76cb266a0 100644 --- a/.github/workflows/self-hosted.yml +++ b/.github/workflows/self-hosted.yml @@ -93,7 +93,7 @@ jobs: - name: Check for tests results run: | - ! grep -q "FAILED" ${{ env.test-file }} + ! grep -qi "FAILED" ${{ env.test-file }} clean: name: Cleanup workspace diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 61ba467c3..6828c3d40 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -106,4 +106,4 @@ jobs: - name: Check for tests results run: | - ! grep -q "FAILED" ${{ env.test-file }} + ! grep -qi "FAILED" ${{ env.test-file }} From 2281ab3ca77c4e3ffa1c0388c7951822ef6dd6cd Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Sat, 15 Nov 2025 17:02:53 +0300 Subject: [PATCH 17/18] style: add newlines in the end of test files --- .github/workflows/self-hosted.yml | 8 +------- tests/test_array.cpp | 2 +- tests/test_library.cpp | 2 +- tests/test_matrix.cpp | 2 +- tests/test_mxmT.cpp | 2 +- tests/test_mxv.cpp | 4 ++-- tests/test_op.cpp | 2 +- tests/test_opencl_merge.cpp | 2 +- tests/test_schedule.cpp | 2 +- tests/test_vxm.cpp | 2 +- 10 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml index 76cb266a0..84f0e967e 100644 --- a/.github/workflows/self-hosted.yml +++ b/.github/workflows/self-hosted.yml @@ -18,7 +18,7 @@ on: - '.gitmodules' - 'CMakeLists.txt' pull_request: - branches: [ main ] + branches: [ main, pocl-support ] env: build-dir: "build" @@ -64,12 +64,6 @@ jobs: fail-fast: false matrix: include: - - gpu: NVIDIA-GeForce-GT-1030 - platform: 2 - device: 0 - - gpu: AMD-Radeon-RX-6750-XT - platform: 1 - device: 0 - gpu: Intel-Core-i7-4790 platform: 0 device: 0 diff --git a/tests/test_array.cpp b/tests/test_array.cpp index 51278a5dc..31f6c131a 100644 --- a/tests/test_array.cpp +++ b/tests/test_array.cpp @@ -99,4 +99,4 @@ TEST(array, read) { } } -SPLA_GTEST_MAIN \ No newline at end of file +SPLA_GTEST_MAIN diff --git a/tests/test_library.cpp b/tests/test_library.cpp index 7eba89e93..114f8db1b 100644 --- a/tests/test_library.cpp +++ b/tests/test_library.cpp @@ -66,4 +66,4 @@ TEST(library, default_accelerator_info) { std::cout << "Info: " << acc_info << std::endl; } -SPLA_GTEST_MAIN \ No newline at end of file +SPLA_GTEST_MAIN diff --git a/tests/test_matrix.cpp b/tests/test_matrix.cpp index 2246b38e9..14ecc4e17 100644 --- a/tests/test_matrix.cpp +++ b/tests/test_matrix.cpp @@ -271,4 +271,4 @@ TEST(matrix, emult) { } } -SPLA_GTEST_MAIN_WITH_FINALIZE \ No newline at end of file +SPLA_GTEST_MAIN_WITH_FINALIZE diff --git a/tests/test_mxmT.cpp b/tests/test_mxmT.cpp index fbec06677..2fa385494 100644 --- a/tests/test_mxmT.cpp +++ b/tests/test_mxmT.cpp @@ -140,4 +140,4 @@ TEST(mxmT_masked, perf_zero) { } -SPLA_GTEST_MAIN \ No newline at end of file +SPLA_GTEST_MAIN diff --git a/tests/test_mxv.cpp b/tests/test_mxv.cpp index b9f3d5843..611c4c404 100644 --- a/tests/test_mxv.cpp +++ b/tests/test_mxv.cpp @@ -89,7 +89,7 @@ TEST(mxv_masked, naive) { } TEST(mxv_masked, perf) { - const int N = 980000; + const int N = 1000000; const int K = 256; const int S = 10; const int NITER = 10; @@ -129,4 +129,4 @@ TEST(mxv_masked, perf) { std::cout << std::endl; } -SPLA_GTEST_MAIN \ No newline at end of file +SPLA_GTEST_MAIN diff --git a/tests/test_op.cpp b/tests/test_op.cpp index c439c29a5..a1d915891 100644 --- a/tests/test_op.cpp +++ b/tests/test_op.cpp @@ -61,4 +61,4 @@ TEST(op_binary, custom) { display_op_info(custom_plus); } -SPLA_GTEST_MAIN_WITH_FINALIZE \ No newline at end of file +SPLA_GTEST_MAIN_WITH_FINALIZE diff --git a/tests/test_opencl_merge.cpp b/tests/test_opencl_merge.cpp index 2716d1964..40e8d96f2 100644 --- a/tests/test_opencl_merge.cpp +++ b/tests/test_opencl_merge.cpp @@ -618,4 +618,4 @@ TEST(opencl_merge, merge_path_v2) { std::cout << "Time taken for Merge Cpu: " << (result_time_cpu / N_RUNS).count() << " ms\n"; } -SPLA_GTEST_MAIN \ No newline at end of file +SPLA_GTEST_MAIN diff --git a/tests/test_schedule.cpp b/tests/test_schedule.cpp index 15d9b7f63..cb978910f 100644 --- a/tests/test_schedule.cpp +++ b/tests/test_schedule.cpp @@ -37,4 +37,4 @@ TEST(schedule, task_callback) { schedule->submit(); } -SPLA_GTEST_MAIN_WITH_FINALIZE \ No newline at end of file +SPLA_GTEST_MAIN_WITH_FINALIZE diff --git a/tests/test_vxm.cpp b/tests/test_vxm.cpp index 58c31e55c..615aa8c30 100644 --- a/tests/test_vxm.cpp +++ b/tests/test_vxm.cpp @@ -186,4 +186,4 @@ TEST(vxm_masked, perf_and_or) { std::cout << std::endl; } -SPLA_GTEST_MAIN \ No newline at end of file +SPLA_GTEST_MAIN From f0676eff1ff186a65dc048c90e0aa1f41c0cfa9a Mon Sep 17 00:00:00 2001 From: Kostya Oreshin Date: Sat, 15 Nov 2025 17:36:51 +0300 Subject: [PATCH 18/18] fix: change vendor id for pocl --- src/opencl/cl_accelerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opencl/cl_accelerator.cpp b/src/opencl/cl_accelerator.cpp index 70620d8e4..d91291f55 100644 --- a/src/opencl/cl_accelerator.cpp +++ b/src/opencl/cl_accelerator.cpp @@ -119,7 +119,7 @@ namespace spla { auto dev_type = m_device.getInfo(); auto m_platform_name = m_platform.getInfo(); - if ((m_vendor_id == 65538 || + if ((m_vendor_id == 65542 || m_vendor_name.find("pocl") != std::string::npos || m_vendor_name.find("POCL") != std::string::npos || m_vendor_name.find("PoCL") != std::string::npos ||