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

temp work-around for 32-bit inference failure (#29923) #30032

Merged
merged 3 commits into from
Nov 15, 2018

Conversation

StefanKarpinski
Copy link
Sponsor Member

No description provided.

@KristofferC
Copy link
Sponsor Member

KristofferC commented Nov 14, 2018

@test_broken maybe.

Won't we just merge this and then forget about it?

@KlausC
Copy link
Contributor

KlausC commented Nov 14, 2018

Shouldn't if Sys.WORD_SIZE == 64 || S === Int128 be if Sys.WORD_SIZE == 32 && S == Int128 ?

@StefanKarpinski
Copy link
Sponsor Member Author

Yes, it should. I had the logic inverted previously and only half fixed it!

@StefanKarpinski
Copy link
Sponsor Member Author

StefanKarpinski commented Nov 14, 2018

@test_broken maybe.

I'm not aware of a good way to do that for @inferred which is what's failing.

Won't we just merge this and then forget about it?

Possibly but it's been a week with all 32-bit CI failing, which is not acceptable. I've pinged the entire compiler team on Slack but gotten no response. @JeffBezanson, @vtjnash, @Keno, can someone at least comment if they're looking at #29923 or not?

@KristofferC
Copy link
Sponsor Member

Possibly but it's been a week with all 32-bit CI failing, which is not acceptable.

Agreed, this is probably for the best to not waste everyones time looking at CI logs.

@JeffBezanson
Copy link
Sponsor Member

I agree we should temporarily disable this. We don't know how to fix this. It has come up before and we've never fully figured it out, so there's no estimate of how long it will take to fix.

@martinholters
Copy link
Member

Alternatively, we keep the test and do

--- a/base/int.jl
+++ b/base/int.jl
@@ -775,7 +775,7 @@ if Core.sizeof(Int) == 4
         return Int128(rem(BigInt(x), BigInt(y)))
     end
     function rem(x::UInt128, y::UInt128)
-        return UInt128(rem(BigInt(x), BigInt(y)))
+        return UInt128(rem(BigInt(x), BigInt(y)))::UInt128
     end
 
     function mod(x::Int128, y::Int128)

Here, I'd like to point out that (on 32bit systems), we have two definitions in int.jl which for operations on UInt128 go via BigInt:

julia/base/int.jl

Lines 770 to 772 in e209c3d

function div(x::UInt128, y::UInt128)
return UInt128(div(BigInt(x), BigInt(y)))::UInt128
end

julia/base/int.jl

Lines 777 to 779 in e209c3d

function rem(x::UInt128, y::UInt128)
return UInt128(rem(BigInt(x), BigInt(y)))
end

So by adding the type assertion to the second one, too, we then have covered "all" of them. Therefore, one may hope for these test failures not to show up again. It is still more of a work-around than a fix, though.

@martinholters
Copy link
Member

Even though I'm experimenting with an alternative over in #30050, I'm in favour of merging this ASAP to get CI back up and then investigate further.

@fredrikekre
Copy link
Member

Unrelated (?) Profile test failure on AV 32-bit.

@StefanKarpinski
Copy link
Sponsor Member Author

StefanKarpinski commented Nov 15, 2018

Restarting AV given that the whole point of this PR is to fix CI, so I'd like to see it actually pass.

@musm
Copy link
Contributor

musm commented Nov 15, 2018

all green 👍

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.

7 participants