From 96e6b2259ff5d5a2405c3b30a2e6871e562e2f37 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Fri, 24 Oct 2025 07:59:58 -0500 Subject: [PATCH 1/2] Some 1.12 fixes --- ext/ReactantKernelAbstractionsExt.jl | 7 ++----- src/utils.jl | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ext/ReactantKernelAbstractionsExt.jl b/ext/ReactantKernelAbstractionsExt.jl index ee13c3bb3f..63d85c74fa 100644 --- a/ext/ReactantKernelAbstractionsExt.jl +++ b/ext/ReactantKernelAbstractionsExt.jl @@ -109,12 +109,9 @@ function (obj::KA.Kernel{ReactantBackend})(args...; ndrange=nothing, workgroupsi return nothing end -Reactant.@reactant_overlay @noinline Base.@nospecializeinfer function ( - obj::KA.Kernel{ReactantBackend} -)( - args...; ndrange=nothing, workgroupsize=nothing +Reactant.@reactant_overlay Base.@nospecializeinfer @noinline function (obj::KA.Kernel{ReactantBackend})( + @nospecialize args...; ndrange=nothing, workgroupsize=nothing ) - @nospecialize return Reactant.call_with_reactant( Reactant.ka_with_reactant, ndrange, workgroupsize, obj, args... ) diff --git a/src/utils.jl b/src/utils.jl index c7cb254946..61903f4fc5 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -610,7 +610,7 @@ end # using a custom interpreter in type unstable code. # `redub_arguments` is `(typeof(original_function), map(typeof, original_args_tuple)...)` function call_with_reactant_generator( - world::UInt, source::LineNumberNode, self, @nospecialize(redub_arguments) + world::UInt, source::Union{LineNumberNode, Core.Method}, self, @nospecialize(redub_arguments) ) @nospecialize args = redub_arguments From c2298bdb628c0c058522195691217e4e2c750086 Mon Sep 17 00:00:00 2001 From: William Moses Date: Fri, 24 Oct 2025 08:21:28 -0500 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ext/ReactantKernelAbstractionsExt.jl | 4 +++- src/utils.jl | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ext/ReactantKernelAbstractionsExt.jl b/ext/ReactantKernelAbstractionsExt.jl index 63d85c74fa..1e38b81b9a 100644 --- a/ext/ReactantKernelAbstractionsExt.jl +++ b/ext/ReactantKernelAbstractionsExt.jl @@ -109,7 +109,9 @@ function (obj::KA.Kernel{ReactantBackend})(args...; ndrange=nothing, workgroupsi return nothing end -Reactant.@reactant_overlay Base.@nospecializeinfer @noinline function (obj::KA.Kernel{ReactantBackend})( +Reactant.@reactant_overlay Base.@nospecializeinfer @noinline function ( + obj::KA.Kernel{ReactantBackend} +)( @nospecialize args...; ndrange=nothing, workgroupsize=nothing ) return Reactant.call_with_reactant( diff --git a/src/utils.jl b/src/utils.jl index 61903f4fc5..eb8e2b3701 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -610,7 +610,10 @@ end # using a custom interpreter in type unstable code. # `redub_arguments` is `(typeof(original_function), map(typeof, original_args_tuple)...)` function call_with_reactant_generator( - world::UInt, source::Union{LineNumberNode, Core.Method}, self, @nospecialize(redub_arguments) + world::UInt, + source::Union{LineNumberNode,Core.Method}, + self, + @nospecialize(redub_arguments) ) @nospecialize args = redub_arguments