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 CI, CD #88

Merged
merged 42 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9f512a1
Add DEB packaging
Beanavil Jul 6, 2024
b6a010f
Update check-format script
Beanavil Jul 6, 2024
00c3656
Android build in CI
mfep Jul 6, 2024
fb69fd5
Add linux CI
Beanavil Jul 6, 2024
ad728d8
Remove the C headers, C++ headers and loader from the SDK deb package
Beanavil Jul 6, 2024
6c4ff26
Submodules update
Beanavil Jul 6, 2024
d3dee18
Add Windows CI job
Beanavil Jul 6, 2024
42c576f
Add MacOS CI job
Beanavil Jul 6, 2024
38e75c8
Unify C/C++ standards
Beanavil Jul 6, 2024
3de17f6
Fix warnings and errors gcc
Beanavil Jul 6, 2024
877ceb6
Fix warnings and errors clang
Beanavil Jul 6, 2024
1416b55
Fix multi-config
Beanavil Jul 6, 2024
7efdb4b
Fix MacOS errors
Beanavil Jul 6, 2024
60734a3
Fix Windows errors
Beanavil Jul 6, 2024
d6b6083
Install Windows OpenCL runtime
Beanavil Jul 6, 2024
3857d95
Fix blur/blurcpp samples failures
Beanavil Jul 6, 2024
73b7760
Fix MacOS test execution
Beanavil Jul 6, 2024
13870bd
Fixed blur/blucpp OpenCL 2.0 check
Beanavil Jul 6, 2024
94f6c33
Various minor improvements
mfep Jul 6, 2024
3949508
Updated release scripts
mfep Jul 6, 2024
69ab367
Building and packaging clinfo
mfep Jul 6, 2024
6150a46
Minor fixes and improvements
mfep Jul 6, 2024
6c3b05f
Removed ToDos
mfep Jul 6, 2024
34e6004
Updated RELEASE.md
mfep Jul 6, 2024
bb326d2
Removed _get_platform(cl_platform_id platform) from mako
mfep Jul 6, 2024
6ae062f
Fixed resource release bug in binaries sample
mfep Jul 6, 2024
496dd19
Remove null pointer checks
Beanavil Jul 6, 2024
df2de29
Re-added whereami
mfep Jul 6, 2024
36afd8a
Using upstream main for OpenCL-Headers submodule
mfep Jul 6, 2024
df8bfb5
Bump deprecated actions
mfep Jul 6, 2024
548a2ad
Removed MSVC++ v141 jobs
mfep Jul 6, 2024
998a83a
Whereami workaround
mfep Jul 6, 2024
0e91876
fix(ci): Fetch a newer version of SFML, update patch
mfep Jul 6, 2024
a92fc0f
fix(ci): Set up OSX architecture
mfep Jul 6, 2024
ffd0299
fix(binaries): Sample lang in binary name
mfep Jul 6, 2024
c288f50
fix(ci): Fixed system deps in Linux builds
mfep Jul 6, 2024
515c7d7
Update docker images
Beanavil Jul 6, 2024
546cbc8
Fix MSVC compiler toolset version
Beanavil Jul 6, 2024
6d72f77
Removed OpenCL 2.0 check and cl_khr_subgroups from blur sample
Beanavil Jul 6, 2024
1612384
Fixed compiler options being reset
Beanavil Jul 6, 2024
2d51805
Bumped version of pocl
Beanavil Jul 6, 2024
ef49e76
Updated submodules' repository URL
Beanavil Sep 3, 2024
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
Prev Previous commit
Next Next commit
Fixed blur/blucpp OpenCL 2.0 check
Beanavil committed Oct 1, 2024

Verified

This commit was signed with the committer’s verified signature.
Beanavil Beatriz Navidad Vilches
commit 13870bd6755147d4dc2d6221762da1147b8b35f2
9 changes: 6 additions & 3 deletions samples/core/blur/blur.cpp
Original file line number Diff line number Diff line change
@@ -494,16 +494,19 @@ std::tuple<bool, bool, bool> BlurCppExample::query_capabilities()
(device.getInfo<CL_DEVICE_LOCAL_MEM_TYPE>() == CL_LOCAL);

// 4) query if device allow subgroup shuffle operations
bool use_subgroups =
cl::util::supports_extension(device, "cl_khr_subgroups");
bool use_subgroup_exchange =
cl::util::supports_extension(device, "cl_khr_subgroup_shuffle");
bool use_subgroup_exchange_relative = cl::util::supports_extension(
device, "cl_khr_subgroup_shuffle_relative");

return std::make_tuple(use_local_mem, use_subgroup_exchange,
use_subgroup_exchange_relative);
return std::make_tuple(use_local_mem,
use_subgroups && use_subgroup_exchange,
use_subgroups && use_subgroup_exchange_relative);
}

bool BlurCppExample::query_opencl_2_0_support()
bool BlurCppExample::query_opencl_c_2_0_support()
{
return cl::util::opencl_c_version_contains(device, "2.0");
}
2 changes: 1 addition & 1 deletion samples/core/blur/blur.hpp
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ class BlurCppExample {
std::tuple<bool, bool, bool> query_capabilities();

// Query device support for OpenCL 2.0
bool query_opencl_2_0_support();
bool query_opencl_c_2_0_support();

void create_image_buffers();

16 changes: 6 additions & 10 deletions samples/core/blur/main.c
Original file line number Diff line number Diff line change
@@ -1049,13 +1049,13 @@ int main(int argc, char *argv[])
}

// 5) query if OpenCL driver version is 2.0
bool opencl_version_2_0 = false;
bool opencl_c_version_2_0 = false;
{
char *driver_version = NULL;
OCLERROR_PAR(
driver_version = cl_util_get_device_info(s.device, CL_DRIVER_VERSION, &error),
error, clean);
opencl_version_2_0 = strcmp("2.0", driver_version) ? 0 : 1;
opencl_c_version_2_0 = strcmp("2.0", driver_version) ? 0 : 1;
clean:
free(driver_version);
}
@@ -1125,24 +1125,22 @@ int main(int argc, char *argv[])
error, prg);

/// Subgroup exchange in dual-pass blur
if (use_subgroup_exchange_relative && opencl_version_2_0)
if (use_subgroup_exchange_relative && opencl_c_version_2_0)
{
printf("Dual-pass subgroup relative exchange blur\n");

kernel_op[0] = '\0';
// cl_khr_subgroup_shuffle_relative requires OpenCL 2.0
strcat(kernel_op, " -cl-std=CL2.0 ");
strcat(kernel_op, "-D USE_SUBGROUP_EXCHANGE_RELATIVE ");
OCLERROR_RET(dual_pass_subgroup_exchange_box_blur(
&s, (cl_int)blur_opts.size),
error, prg);
}
if (use_subgroup_exchange && opencl_version_2_0)
if (use_subgroup_exchange && opencl_c_version_2_0)
{
printf("Dual-pass subgroup exchange blur\n");

kernel_op[0] = '\0';
// cl_khr_subgroup_shuffle requires OpenCL 2.0
strcat(kernel_op, " -cl-std=CL2.0 ");
strcat(kernel_op, "-D USE_SUBGROUP_EXCHANGE ");

@@ -1182,25 +1180,23 @@ int main(int argc, char *argv[])
}

/// Subgroup exchange in dual-pass Gaussian blur
if (use_subgroup_exchange_relative && opencl_version_2_0)
if (use_subgroup_exchange_relative && opencl_c_version_2_0)
{
printf("Dual-pass subgroup relative exchange Gaussian blur\n");

kernel_op[0] = '\0';
// cl_khr_subgroup_shuffle_relative requires OpenCL 2.0
strcat(kernel_op, " -cl-std=CL2.0 ");
strcat(kernel_op, "-D USE_SUBGROUP_EXCHANGE_RELATIVE ");

OCLERROR_RET(dual_pass_subgroup_exchange_kernel_blur(&s, gauss_size,
gauss_kern),
error, gkrn);
}
if (use_subgroup_exchange && opencl_version_2_0)
if (use_subgroup_exchange && opencl_c_version_2_0)
{
printf("Dual-pass subgroup exchange Gaussian blur\n");

kernel_op[0] = '\0';
// cl_khr_subgroup_shuffle requires OpenCL 2.0
strcat(kernel_op, " -cl-std=CL2.0 ");
strcat(kernel_op, "-D USE_SUBGROUP_EXCHANGE ");

14 changes: 5 additions & 9 deletions samples/core/blur/main.cpp
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ int main(int argc, char* argv[])
std::tie(use_local_mem, use_subgroup_exchange,
use_subgroup_exchange_relative) = blur.query_capabilities();

bool opencl_version_2_0 = blur.query_opencl_2_0_support();
bool opencl_c_version_2_0 = blur.query_opencl_c_2_0_support();

// Create image buffers used for operation. In this example input,
// output and temporary image buffers are used. Temporary buffer is used
@@ -87,22 +87,20 @@ int main(int argc, char* argv[])
// file you can find 'USE_SUBGROUP_EXCHANGE_RELATIVE' C-like
// definition switch for blur_box_horizontal_subgroup_exchange
// function. In this case, 2 blur kernel functors are used.
if (use_subgroup_exchange_relative && opencl_version_2_0)
if (use_subgroup_exchange_relative && opencl_c_version_2_0)
{
std::cout << "Dual-pass subgroup relative exchange blur"
<< std::endl;
// cl_khr_subgroup_shuffle_relative requires OpenCL 2.0
blur.build_program(
"-D USE_SUBGROUP_EXCHANGE_RELATIVE -cl-std=CL2.0 ");
blur.dual_pass_subgroup_exchange_box_blur();
}

// Same as the previous one, but with a different build switch. See
// the blur.cl file for more info about the switch.
if (use_subgroup_exchange && opencl_version_2_0)
if (use_subgroup_exchange && opencl_c_version_2_0)
{
std::cout << "Dual-pass subgroup exchange blur" << std::endl;
// cl_khr_subgroup_shuffle requires OpenCL 2.0
blur.build_program("-D USE_SUBGROUP_EXCHANGE -cl-std=CL2.0 ");
blur.dual_pass_subgroup_exchange_box_blur();
}
@@ -135,24 +133,22 @@ int main(int argc, char* argv[])

// Similar to dual_pass_subgroup_exchange_box_blur but with a gauss
// kernel.
if (use_subgroup_exchange_relative && opencl_version_2_0)
if (use_subgroup_exchange_relative && opencl_c_version_2_0)
{
std::cout
<< "Dual-pass subgroup relative exchange Gaussian blur"
<< std::endl;
// cl_khr_subgroup_shuffle_relative requires OpenCL 2.0
blur.build_program(
"-D USE_SUBGROUP_EXCHANGE_RELATIVE -cl-std=CL2.0 ");
blur.dual_pass_subgroup_exchange_kernel_blur();
}

// Same as the previous one, but with a different build switch. See
// the blur.cl file for more info about the switch.
if (use_subgroup_exchange && opencl_version_2_0)
if (use_subgroup_exchange && opencl_c_version_2_0)
{
std::cout << "Dual-pass subgroup exchange Gaussian blur"
<< std::endl;
// cl_khr_subgroup_shuffle requires OpenCL 2.0
blur.build_program("-D USE_SUBGROUP_EXCHANGE -cl-std=CL2.0 ");
blur.dual_pass_subgroup_exchange_kernel_blur();
}