Skip to content

Commit

Permalink
update project version and submodules - October 2024 (#114)
Browse files Browse the repository at this point in the history
* update project version and submodules - October 2024

* Temporarily disable PPA builds

* Update softprops/action-gh-release to v2

* Minor release script fixes

---------

Co-authored-by: Máté Ferenc Nagy-Egri <mate@rastergrid.com>
  • Loading branch information
bashbaug and MathiasMagnus authored Oct 24, 2024
1 parent 252898e commit 34e6cfc
Show file tree
Hide file tree
Showing 9 changed files with 330 additions and 30 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name: Create Release

jobs:
windows-binary:
name: Binary Release (Windows)
runs-on: windows-2022
defaults:
run:
Expand Down Expand Up @@ -65,7 +66,7 @@ jobs:
if ($LASTEXITCODE -ne 0) { throw "Building OpenCL-SDK in $Config failed." }
}
- name: Package Binary
- name: Package
run: |
& cpack `
--config "${env:GITHUB_WORKSPACE}\build\CPackConfig.cmake" `
Expand All @@ -75,10 +76,11 @@ jobs:
-B "${env:GITHUB_WORKSPACE}\package"
if ($LASTEXITCODE -ne 0) { throw "Packaging OpenCL-SDK failed." }
- name: Upload Package
uses: softprops/action-gh-release@v1
- name: Upload
uses: softprops/action-gh-release@v2
with:
draft: true
token: ${{ secrets.ACTIONS_CREATE_RELEASE_TOKEN }}
files: |
package/OpenCL-SDK-${{github.ref_name}}-Win-${{matrix.BIN}}.zip
Expand Down Expand Up @@ -124,17 +126,18 @@ jobs:
)) `
{ throw 'CMake project version mismatches Git tag name (without leading "v")'}
- name: Package DEB
- name: Package (DEB)
if: ${{ contains(matrix.OS, 'ubuntu') }}
run: |
cpack `
--config "${env:GITHUB_WORKSPACE}/build/CPackSourceConfig.cmake" `
-G DEB `
-C Release `
"${env:GITHUB_WORKSPACE}/package-deb"
-D CPACK_PACKAGE_FILE_NAME='OpenCL-SDK-${{github.ref_name}}-Source' `
-B "${env:GITHUB_WORKSPACE}/package-deb"
if ($LASTEXITCODE -ne 0) { throw "Packaging OpenCL-SDK deb failed." }
- name: Package Source
- name: Package (Archive)
run: |
$Generator = if('${{matrix.OS}}' -match 'windows') {'ZIP'} else {'TGZ'}
& cpack `
Expand All @@ -146,14 +149,17 @@ jobs:
-B "${env:GITHUB_WORKSPACE}/package"
if ($LASTEXITCODE -ne 0) { throw "Packaging OpenCL-SDK source failed." }
- name: Release Source
uses: softprops/action-gh-release@v1
- name: Upload
uses: softprops/action-gh-release@v2
with:
draft: true
token: ${{ secrets.ACTIONS_CREATE_RELEASE_TOKEN }}
files: |
package/OpenCL-SDK-${{github.ref_name}}-Source.*
package-deb/OpenCL-SDK-${{github.ref_name}}-Source.*
ppa:
if: false
runs-on: ubuntu-latest
defaults:
run:
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.16)
set(CMAKE_CXX_STANDARD 14)

project(OpenCL-SDK
VERSION 2024.05.08
VERSION 2024.10.24
LANGUAGES
C CXX
)
Expand Down
3 changes: 2 additions & 1 deletion lib/src/Extensions/scripts/call_all.c.mako
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ defaultValueForType = {
# Integral Types
'cl_int' : '0',
'cl_uint' : '0',
'int' : '0',
'size_t' : '0',
'UINT' : '0',
}
Expand Down Expand Up @@ -118,7 +119,7 @@ def getCallArgs(params):
return callstr
%>/*******************************************************************************
// Copyright (c) 2021-2023 Ben Ashbaugh
// Copyright (c) 2021-2024 Ben Ashbaugh
//
// SPDX-License-Identifier: MIT or Apache-2.0
*/
Expand Down
18 changes: 17 additions & 1 deletion lib/src/Extensions/scripts/openclext.cpp.mako
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def getCParameterStrings(params):
return strings
%>/*******************************************************************************
// Copyright (c) 2021-2023 Ben Ashbaugh
// Copyright (c) 2021-2024 Ben Ashbaugh
//
// SPDX-License-Identifier: MIT or Apache-2.0
*/
Expand Down Expand Up @@ -271,6 +271,20 @@ static inline cl_platform_id _get_platform(cl_mem memobj)
return _get_platform(context);
}

static inline cl_platform_id _get_platform(cl_event event)
{
if (event == nullptr) return nullptr;

cl_context context = nullptr;
clGetEventInfo(
event,
CL_EVENT_CONTEXT,
sizeof(context),
&context,
nullptr);
return _get_platform(context);
}

/***************************************************************
* Function Pointer Typedefs
***************************************************************/
Expand Down Expand Up @@ -739,6 +753,8 @@ ${api.RetType} CL_API_CALL ${api.Name}(
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(${api.Params[0].Name} > 0 && ${api.Params[1].Name} ? ${api.Params[1].Name}[0] : nullptr);
% elif api.Name == "clEnqueueCommandBufferKHR":
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(${api.Params[2].Name});
% elif api.Name == "clCancelCommandsIMG":
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(${api.Params[1].Name} > 0 && ${api.Params[0].Name} ? ${api.Params[0].Name}[0] : nullptr);
% else:
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(${api.Params[0].Name});
% endif
Expand Down
Loading

0 comments on commit 34e6cfc

Please sign in to comment.