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

Backports for Julia 1.4 RC2 #34517

Merged
merged 35 commits into from
Feb 22, 2020
Merged

Backports for Julia 1.4 RC2 #34517

merged 35 commits into from
Feb 22, 2020

Conversation

KristofferC
Copy link
Sponsor Member

@KristofferC KristofferC commented Jan 26, 2020

Backported PRs:

@KristofferC KristofferC added status:DO NOT MERGE Do not merge this PR! kind:release Release management and versioning. labels Jan 26, 2020
@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runtests(ALL, vs = ":release-1.3")

@nanosoldier
Copy link
Collaborator

Your test job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

staticfloat and others added 8 commits January 30, 2020 08:00
These should probably be using `samefile`, if they were real code instead of just tests. Though it's unclear why real code would be doing this. Maybe just don't put your paths in hash-tables and you'll normally be fine.

(cherry picked from commit a5c422f)
[release-1.4] Bump OpenBLAS BB tarball version and update checksums
documenter links for the manual, fixes #34488.

(cherry picked from commit 4db419b)
KristofferC and others added 7 commits February 5, 2020 09:32
…(<=3.8) (#34490)

LLVM <= 3.8 segfaults when LLVM SIMD vectors are not powers of 2 (or a sum
of 2 different powers of 2). This LLVM bug was corrected in 2017 (see
<https://bugs.llvm.org/show_bug.cgi?id=27708>). This change removes this
work-around, finally allowing arbitrary SIMD vector lengths in Julia.

This changes Julia's ABI for SIMD types. All SIMD types are now represented
as SIMD vectors in LLVM. The work-around represented some SIMD types as
LLVM arrays instead to avoid the LLVM segfault. I don't think that SIMD
vector lengths that are not a power of 2 were in widespread use, if at all.

(cherry picked from commit e0740fe)
Rather than meaning the actual alignment of the object, this now means
the preferred alignment of the object. The actual alignment of any
object is the minimum of this preferred alignment and the alignment
supported by the runtime allocator. This aligns us with how LLVM treats
alignment, and is probably reasonably sensible anyways.

Also tries to audit our existing uses of CreateLoad/CreateStore for
correctness, and upgrade some to include pointer-types.

fixes #32414

(cherry picked from commit 268ac24)
* Construct MulAddMul at gemm_wrapper! call sites

* Add branches manually in MulAddMul constructor

This is suggested by chethega in:
#29634 (comment)

* Update stdlib/LinearAlgebra/src/generic.jl

Co-Authored-By: Kristoffer Carlsson <kristoffer.carlsson@chalmers.se>

Co-authored-by: Kristoffer Carlsson <kristoffer.carlsson@chalmers.se>
(cherry picked from commit 2da42e0)
* make package cache interit permission from source

* remove temporary directries

(cherry picked from commit 5075472)
vchuravy and others added 2 commits February 6, 2020 09:36
Vectorized loads can come in 3 variants:
- scalar
- masked
- gather

All work about the same--if we run into a Loaded pointer, we need to
follow back the base pointer and track it. And otherwise they're just
normal def/use statements. But we also need to fix up after an LLVM
mistake and put a valid value in the pass-through slot.

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
(cherry picked from commit 7d1c925)
Even non LoadInst / StoreInst (esp. vectorized loads and stores) can have this information

(cherry picked from commit 40d0bc5)
@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runtests(ALL, vs = ":release-1.3")

@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runbenchmarks(ALL, vs =":release-1.3")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

JeffBezanson and others added 4 commits February 17, 2020 15:35
The ffs function is not always available under that name, use instead the compiler name for it which may always be used.

(cherry picked from commit ef17985)
Other bad cases are probably less common, but still exist. The code to fix those is included in #25984.

Fixes #34680

(cherry picked from commit 66ecd90)
@staticfloat
Copy link
Sponsor Member

Actually, looking into this, we don't need to backport #34787. This branch works just fine with LLVM assertions as-is. I do find it a little bit weird that you need to set BINARYBUILDER_LLVM_ASSERT=1; I kind of feel that makevar should be eliminated and we should just use the value of LLVM_ASSERT instead.

@KristofferC

This comment has been minimized.

@staticfloat

This comment has been minimized.

staticfloat and others added 9 commits February 19, 2020 11:48
When there is no work to do, the first thread to be idle will attempt to
run the event loop once, waiting for any notifications (which will usually
create new work). However, there is an interesting corner case where a
notification arrives, but no work was scheduled. That doesn't usually happen,
but there are a few situations where it does:

1) Somebody used a libuv primitive outside of julia, so the callback
   doesn't schedule any julia work.
2) Another thread forbily interrupted the waiting thread because it wants to
   take over the event loop for various reasons
3) On Windows, we occasionally get spurious wake ups of the event loop.

The existing code in partr assumed that we were in situation 2, i.e. that
there was another thread waiting to take over the event loop, so it released
the event loop and simply put the current thread to sleep in the expectation
that another thread will pick it up. However, if we instead are in one of the
other two conditions, there may not be another thread there to pick up the event
loop. Thus, with no thread owning the event loop, julia will stop responding to
events and effectively deadlock. Since both 1 and 3 are rare, and we don't actually
enter the event loop until there was no work for 4 milliseconds (which is fairly rare),
this condition rarely happens, but is occasionally observable on Windows, where it
caused #34769. To test that this fix works, we manually create situation 1 in the
test by creating an idle callback, which will prevent the event loop from blocking,
but only schedules julia work after it's been called 100 times. This reproduces
the observed failure from the issue and is fixed by this PR.

Fixes #34769

Co-authored-by: Jeff Bezanson <jeff@juliacomputing.com>
Co-authored-by: Jameson Nash <jameson@juliacomputing.com>
(cherry picked from commit f36edc2)
)

We were lying to LLVM, and it now catches that in the verifier. Stop
lying to LLVM so that it will again be happy to generate good code for
us (e.g. optimizing this to bcmp).

(cherry picked from commit d634f73)
We were being too aggressive at unwrapping these: since they are already
unwrapped once, they need to be treated almost as a normal struct.

fixes #29864

(cherry picked from commit 8720530)
Fix hypot with both arguments 0

Remove hypot from Furlongs in order to test the defined fallback

(cherry picked from commit 8e3aa66)
@KristofferC KristofferC changed the title WIP: Backports for Julia 1.4 RC2 Backports for Julia 1.4 RC2 Feb 21, 2020
@KristofferC KristofferC removed the status:DO NOT MERGE Do not merge this PR! label Feb 21, 2020
@KristofferC
Copy link
Sponsor Member Author

This should be good to go ones CI passes.

@JeffBezanson
Copy link
Sponsor Member

There is also #34770.

@KristofferC
Copy link
Sponsor Member Author

It is not on the milestone. Why is it a blocker?

@JeffBezanson
Copy link
Sponsor Member

Agreed; there is a bug fix there but it doesn't seem super critical.

The `reduced_indices` and `reduced_indices0` methods sometimes assert
that the return axes type is the same as the input.
Consequently, the implementation of `reduced_index` had better
return a range of the same type as the input.

This corrects the error in
JuliaArrays/OffsetArrays.jl#92.
I'll put a workaround in OffsetArrays.jl too.

(cherry picked from commit eda4131)
@KristofferC
Copy link
Sponsor Member Author

KristofferC commented Feb 21, 2020

Ok, it got merged so I put in the commit in that PR that was asked to be backported.

@KristofferC KristofferC merged commit 7612062 into release-1.4 Feb 22, 2020
@KristofferC KristofferC deleted the backports-release-1.4 branch February 22, 2020 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:release Release management and versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.