Skip to content

KernelIntrinsics#403

Open
christiangnrd wants to merge 5 commits into
JuliaGPU:mainfrom
christiangnrd:intrinsics
Open

KernelIntrinsics#403
christiangnrd wants to merge 5 commits into
JuliaGPU:mainfrom
christiangnrd:intrinsics

Conversation

@christiangnrd

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/OpenCLKernels.jl b/src/OpenCLKernels.jl
index 626b7fa..4dcfbdc 100644
--- a/src/OpenCLKernels.jl
+++ b/src/OpenCLKernels.jl
@@ -129,9 +129,9 @@ end
 
 KI.argconvert(::OpenCLBackend, arg) = kernel_convert(arg)
 
-function KI.kernel_function(::OpenCLBackend, f::F, tt::TT=Tuple{}; name = nothing, kwargs...) where {F,TT}
+function KI.kernel_function(::OpenCLBackend, f::F, tt::TT = Tuple{}; name = nothing, kwargs...) where {F, TT}
     kern = clfunction(f, tt; name, kwargs...)
-    KI.Kernel{OpenCLBackend, typeof(kern)}(OpenCLBackend(), kern)
+    return KI.Kernel{OpenCLBackend, typeof(kern)}(OpenCLBackend(), kern)
 end
 
 function (obj::KI.Kernel{OpenCLBackend})(args...; numworkgroups = 1, workgroupsize = 1)
@@ -147,15 +147,15 @@ function (obj::KI.Kernel{OpenCLBackend})(args...; numworkgroups = 1, workgroupsi
 end
 
 
-function KI.kernel_max_work_group_size(kernel::KI.Kernel{<:OpenCLBackend}; max_work_items::Int=typemax(Int))::Int
+function KI.kernel_max_work_group_size(kernel::KI.Kernel{<:OpenCLBackend}; max_work_items::Int = typemax(Int))::Int
     wginfo = cl.work_group_info(kernel.kern.fun, cl.device())
-    Int(min(wginfo.size, max_work_items))
+    return Int(min(wginfo.size, max_work_items))
 end
 function KI.max_work_group_size(::OpenCLBackend)::Int
-    Int(cl.device().max_work_group_size)
+    return Int(cl.device().max_work_group_size)
 end
 function KI.multiprocessor_count(::OpenCLBackend)::Int
-    Int(cl.device().max_compute_units)
+    return Int(cl.device().max_compute_units)
 end
 
 ## Indexing Functions

@codecov

codecov Bot commented Nov 18, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.46%. Comparing base (a1f79db) to head (de7c136).

Files with missing lines Patch % Lines
src/OpenCLKernels.jl 88.88% 2 Missing ⚠️
src/compiler/compilation.jl 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #403      +/-   ##
==========================================
+ Coverage   80.84%   82.46%   +1.62%     
==========================================
  Files          12       11       -1     
  Lines         736      730       -6     
==========================================
+ Hits          595      602       +7     
+ Misses        141      128      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christiangnrd christiangnrd force-pushed the intrinsics branch 2 times, most recently from 75cf809 to f41bd02 Compare January 11, 2026 21:44
@christiangnrd christiangnrd force-pushed the intrinsics branch 2 times, most recently from f7c1884 to 69ead4d Compare February 13, 2026 23:00
@christiangnrd christiangnrd force-pushed the intrinsics branch 3 times, most recently from 43ea79e to 81dc224 Compare June 4, 2026 17:21
@christiangnrd christiangnrd force-pushed the intrinsics branch 2 times, most recently from 0e1a1a7 to 8cba423 Compare June 16, 2026 19:07
@maleadt maleadt closed this Jun 16, 2026
@maleadt maleadt reopened this Jun 16, 2026
@christiangnrd christiangnrd force-pushed the intrinsics branch 2 times, most recently from 585336d to 3c2f80b Compare June 18, 2026 14:23
@christiangnrd christiangnrd force-pushed the intrinsics branch 2 times, most recently from 84247df to 3446d9f Compare July 2, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants