Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update project version and submodules - April 2024 #103

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ jobs:
name: Exercise Python examples on ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
#os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -140,7 +141,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
#os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-13]
steps:
- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 3.0)
set(CMAKE_CXX_STANDARD 14)

project(OpenCL-SDK
VERSION 2023.12.14
VERSION 2024.05.08
LANGUAGES
C CXX
)
Expand Down
2 changes: 1 addition & 1 deletion external/OpenCL-Headers
Submodule OpenCL-Headers updated 2 files
+304 −39 CL/cl_ext.h
+1 −2 CMakeLists.txt
24 changes: 20 additions & 4 deletions samples/core/callback/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/threads.c"
int main(void) { thrd_sleep(&(struct timespec){.tv_nsec=1}, NULL); }
")

file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/atomic.c"
"#include <stdatomic.h>
int main() { return 0; }
")

# Signature can be modernized at CMake version 3.25
try_compile(
HAS_C11_THREADS
Expand All @@ -29,7 +34,21 @@ try_compile(
C_STANDARD_REQUIRED ON
)

if (HAS_C11_THREADS)
try_compile(
HAS_C11_ATOMICS
"${CMAKE_CURRENT_BINARY_DIR}"
SOURCES "${CMAKE_CURRENT_BINARY_DIR}/atomic.c"
C_STANDARD 11
C_STANDARD_REQUIRED ON
)

if (NOT HAS_C11_THREADS)
message(WARNING
"Skipping callback sample, C11 standard threads are not supported with the current toolset")
elseif (NOT HAS_C11_ATOMICS)
message(WARNING
"Skipping callback sample, C11 standard atomics are not supported with the current toolset")
else()
add_sample(
TEST
TARGET callback
Expand All @@ -38,9 +57,6 @@ if (HAS_C11_THREADS)
KERNELS reaction_diffusion.cl)
target_link_libraries(callback PRIVATE
$<TARGET_NAME_IF_EXISTS:Threads::Threads>)
else()
message(WARNING
"Skipping callback sample, C11 standard threads are not supported with the current toolset")
endif()

add_sample(
Expand Down
Loading