-
Notifications
You must be signed in to change notification settings - Fork 56
Fixes for Julia nightly #725
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
Conversation
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/jlgen.jl b/src/jlgen.jl
index f9cf153..01b16fe 100644
--- a/src/jlgen.jl
+++ b/src/jlgen.jl
@@ -811,11 +811,15 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
# lookup function (used to populate method_instances) isn't always called then.
num_cis = Ref{Csize_t}(0)
- @ccall jl_get_llvm_cis(native_code::Ptr{Cvoid}, num_cis::Ptr{Csize_t},
- C_NULL::Ptr{Cvoid})::Nothing
+ @ccall jl_get_llvm_cis(
+ native_code::Ptr{Cvoid}, num_cis::Ptr{Csize_t},
+ C_NULL::Ptr{Cvoid}
+ )::Nothing
resize!(method_instances, num_cis[])
- @ccall jl_get_llvm_cis(native_code::Ptr{Cvoid}, num_cis::Ptr{Csize_t},
- method_instances::Ptr{Cvoid})::Nothing
+ @ccall jl_get_llvm_cis(
+ native_code::Ptr{Cvoid}, num_cis::Ptr{Csize_t},
+ method_instances::Ptr{Cvoid}
+ )::Nothing
for (i, ci) in enumerate(method_instances)
method_instances[i] = ci.def::MethodInstance
diff --git a/test/native.jl b/test/native.jl
index da08764..d6c6ced 100644
--- a/test/native.jl
+++ b/test/native.jl
@@ -340,9 +340,9 @@ end
end
@testset "always_inline" begin
- # XXX: broken by JuliaLang/julia#51599, see JuliaGPU/GPUCompiler.jl#527.
- # yet somehow this works on 1.12?
- broken = VERSION >= v"1.13-"
+ # XXX: broken by JuliaLang/julia#51599, see JuliaGPU/GPUCompiler.jl#527.
+ # yet somehow this works on 1.12?
+ broken = VERSION >= v"1.13-"
mod = @eval module $(gensym())
import ..sink
@@ -362,20 +362,24 @@ end
Native.code_llvm(mod.g, Tuple{Int64}; dump_module=true, kernel=true)
end
- @test @filecheck(begin
+ @test @filecheck(
+ begin
check"CHECK-NOT: @{{(julia|j)_expensive_[0-9]+}}"
Native.code_llvm(mod.g, Tuple{Int64}; dump_module=true, kernel=true, always_inline=true)
- end) broken=broken
+ end
+ ) broken = broken
@test @filecheck begin
check"CHECK: @{{(julia|j)_expensive_[0-9]+}}"
Native.code_llvm(mod.h, Tuple{Int64}; dump_module=true, kernel=true)
end
- @test @filecheck(begin
+ @test @filecheck(
+ begin
check"CHECK-NOT: @{{(julia|j)_expensive_[0-9]+}}"
Native.code_llvm(mod.h, Tuple{Int64}; dump_module=true, kernel=true, always_inline=true)
- end) broken=broken
+ end
+ ) broken = broken
end
@testset "function attributes" begin
diff --git a/test/runtests.jl b/test/runtests.jl
index 243a96b..a18e3f0 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -331,7 +331,7 @@ println("Testing finished in $elapsed")
# construct a testset to render the test results
o_ts = Test.DefaultTestSet("Overall")
function with_testset(f, testset)
- @static if VERSION >= v"1.13.0-DEV.1044"
+ return @static if VERSION >= v"1.13.0-DEV.1044"
Test.@with_testset testset f()
else
Test.push_testset(testset)
@@ -350,7 +350,7 @@ with_testset(o_ts) do
with_testset(resp) do
Test.record(o_ts, resp)
end
- elseif isa(resp, Tuple{Int,Int})
+ elseif isa(resp, Tuple{Int, Int})
fake = Test.DefaultTestSet(testname)
for i in 1:resp[1]
Test.record(fake, Test.Pass(:test, nothing, nothing, nothing, nothing))
@@ -387,7 +387,7 @@ with_testset(o_ts) do
# the test runner itself had some problem, so we may have hit a segfault,
# deserialization errors or something similar. Record this testset as Errored.
fake = Test.DefaultTestSet(testname)
- Test.record(fake, Test.Error(:nontest_error, testname, nothing, Base.ExceptionStack([(exception=resp,backtrace=[])]), LineNumberNode(1)))
+ Test.record(fake, Test.Error(:nontest_error, testname, nothing, Base.ExceptionStack([(exception = resp, backtrace = [])]), LineNumberNode(1)))
with_testset(fake) do
Test.record(o_ts, fake)
end
@@ -396,7 +396,7 @@ with_testset(o_ts) do
for test in tests
(test in completed_tests) && continue
fake = Test.DefaultTestSet(test)
- Test.record(fake, Test.Error(:test_interrupted, test, nothing, Base.ExceptionStack([(exception="skipped",backtrace=[])]), LineNumberNode(1)))
+ Test.record(fake, Test.Error(:test_interrupted, test, nothing, Base.ExceptionStack([(exception = "skipped", backtrace = [])]), LineNumberNode(1)))
with_testset(fake) do
Test.record(o_ts, fake)
end
@@ -405,7 +405,7 @@ end
println()
Test.print_test_results(o_ts, 1)
if (VERSION >= v"1.13.0-DEV.1037" && !Test.anynonpass(o_ts)) ||
- (VERSION < v"1.13.0-DEV.1037" && !o_ts.anynonpass)
+ (VERSION < v"1.13.0-DEV.1037" && !o_ts.anynonpass)
println(" \033[32;1mSUCCESS\033[0m")
else
println(" \033[31;1mFAILURE\033[0m\n")
diff --git a/test/setup.jl b/test/setup.jl
index 38534e9..584712f 100644
--- a/test/setup.jl
+++ b/test/setup.jl
@@ -12,7 +12,7 @@ end
using .FileCheck
if VERSION >= v"1.13.0-DEV.1044"
-using Base.ScopedValues
+ using Base.ScopedValues
end
@@ -65,8 +65,8 @@ function runtests(f, name)
end
old_print_setting = Test.TESTSET_PRINT_ENABLE[]
- @static if VERSION >= v"1.13.0-DEV.1044"
- @with Test.TESTSET_PRINT_ENABLE=>false begin
+ return @static if VERSION >= v"1.13.0-DEV.1044"
+ @with Test.TESTSET_PRINT_ENABLE => false begin
inner()
end
else
diff --git a/test/spirv.jl b/test/spirv.jl
index 772531b..b50bc48 100644
--- a/test/spirv.jl
+++ b/test/spirv.jl
@@ -78,7 +78,7 @@ end
backend, supports_fp16=false)) do msg
occursin("unsupported use of half value", msg) &&
occursin("[1] unsafe_store!", msg) &&
- occursin(r"\[\d+\] kernel", msg)
+ occursin(r"\[\d+\] kernel", msg)
end
@test_throws_message(InvalidIRError,
@@ -86,7 +86,7 @@ end
backend, supports_fp64=false)) do msg
occursin("unsupported use of double value", msg) &&
occursin("[1] unsafe_store!", msg) &&
- occursin(r"\[\d+\] kernel", msg)
+ occursin(r"\[\d+\] kernel", msg)
end
end
|
beda583
to
cfe9111
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #725 +/- ##
==========================================
+ Coverage 75.52% 76.12% +0.60%
==========================================
Files 24 24
Lines 3538 3548 +10
==========================================
+ Hits 2672 2701 +29
+ Misses 866 847 -19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d2b874c
to
76f941b
Compare
For the Test problems, I guess either moving to using |
How is it reusable? I thought it only worked for running Base tests. |
Yeah, that's why I said
LinearAlgebra uses it from its own repo: https://github.com/JuliaLang/LinearAlgebra.jl/blob/7b21cabb1e81b719e93ab612937c0ded809fbe6e/.ci/run_tests.jl#L8 and that barely works because julia considers it an stdlib. Some follow-up to JuliaLang/julia#56558 should make it possible to use it for packages as well. |
For the |
I'm making a PR to do that now |
Sorry, didn't see your comment. I've put all the fixes in here. Some things in CUDA.jl and GPUArrays.jl were incorrect, fwiw. |
codeinfo_for_const
to work on newer nightlieseab97f2
to
b8e9b29
Compare
30a6a38
to
9a6487b
Compare
9a6487b
to
57c9188
Compare
Let's see if this works.