Skip to content

Conversation

@simeonschaub
Copy link
Member

as cost threshold for always_inline to avoid integer overflow

fix JuliaGPU/AMDGPU.jl#846

alternative to JuliaLang/julia#60121

as cost threshold for `always_inline` to avoid integer overflow

fix JuliaGPU/AMDGPU.jl#846

alternative to JuliaLang/julia#60121
@github-actions
Copy link
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/interface.jl b/src/interface.jl
index 21ddcf5..e1edfec 100644
--- a/src/interface.jl
+++ b/src/interface.jl
@@ -324,7 +324,7 @@ function optimization_params(@nospecialize(job::CompilerJob))
     kwargs = NamedTuple()
 
     if job.config.always_inline
-        kwargs = (kwargs..., inline_cost_threshold=Int(CC.MAX_INLINE_COST))
+        kwargs = (kwargs..., inline_cost_threshold = Int(CC.MAX_INLINE_COST))
     end
 
     return CC.OptimizationParams(;kwargs...)
diff --git a/test/gcn.jl b/test/gcn.jl
index 95641a4..c6e470c 100644
--- a/test/gcn.jl
+++ b/test/gcn.jl
@@ -37,12 +37,12 @@ end
     end
 end
 
-@testset "https://github.com/JuliaGPU/AMDGPU.jl/issues/846" begin
-    ir, rt = GCN.code_typed((Tuple{Tuple{Val{4}}, Tuple{Float32}},); always_inline=true) do t
-        t[1]
-    end |> only
-    @test rt == Tuple{Val{4}}
-end
+        @testset "https://github.com/JuliaGPU/AMDGPU.jl/issues/846" begin
+            ir, rt = GCN.code_typed((Tuple{Tuple{Val{4}}, Tuple{Float32}},); always_inline = true) do t
+                t[1]
+            end |> only
+            @test rt == Tuple{Val{4}}
+        end
 
 end
 

Copy link
Member

@maleadt maleadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix #527 ?

@simeonschaub simeonschaub merged commit bb4823a into master Nov 15, 2025
27 of 33 checks passed
@simeonschaub simeonschaub deleted the sds/max_inline_cost branch November 15, 2025 09:47
@simeonschaub
Copy link
Member Author

Not 100% sure, JuliaLang/julia#51599 (comment) makes it sound like it wouldn't cover all cases. @aviatesk, do we eventually need a better solution for this?

@aviatesk
Copy link
Contributor

Yeah, I think we need something like JuliaLang/julia#48257 as a complete fix.

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.

call to unknown function jl_f_issubtype but CUDA works

4 participants