forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
DO NOT MERGE: v1.12 branch for comparison to master #202
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
Draft
nickrobinson251
wants to merge
357
commits into
master
Choose a base branch
from
v1.12.0-DEV+RAI
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
966538b
to
9da665d
Compare
9da665d
to
48a5871
Compare
48a5871
to
5974904
Compare
1cff7d7
to
1e6e20d
Compare
02e0f68
to
35024c5
Compare
fb189dc
to
7e4f1cb
Compare
7eb4dc1
to
d4a2432
Compare
…it on (JuliaLang#57585) Reduces the number of invalidations from 512 to 505 on running this code: ```julia struct I <: Integer end Base.Int(::I) = 7 ``` (cherry picked from commit a97137e)
…aLang#57633) Making the closure capture a `SimpleVector` instead of a type should improve type stability. Also deduplicated some common subexpressions while at it. (cherry picked from commit 885b1cd)
The alignment of a nested object (in C layouts) is not affected by the alignment of its parent container when computing a field offset (as if it will be allocated at address 0). This can be strongly counter-intuitive (as it implies it should add padding where it does not seem to provide value to the user), but this is required to match the C standard. It also permits users to write custom allocators which happen to provide alignment in excess of that which codegen may assume is guaranteed, and get the behavioral characteristics they intended to specify (without resorting to computing explicit padding). Addresses JuliaLang#57713 (comment) (cherry picked from commit c9008ff)
…57734) This makes `LazyLibraryPath` eligible for const-prop, which is important so that we can inline/infer `string(::LazyLibraryPath)` at compile-time if the argument is a (global) `const`. Otherwise, this code is not infer-able without something like TypedCallable to make the interface requirements explicit. (cherry picked from commit 3f4eda6)
On my system, this saves ~500 ms when loading CairoMakie (and all dependent packages) (cherry picked from commit bf725f1)
(cherry picked from commit 7525568)
DRY code somewhat by consolidating builtin declarations to use a table or macro definition to auto-generate the required reflection metadata. Mostly NFC, but does include a couple bugfixes caused by the consistency this enforces. Adding a new `Builtin` is now simply a matter of declaring it in `builtin_proto.h` and defining it in `builtins.c` and any relevant declarations are handled automatically. (cherry picked from commit 907b201)
After the bindings change, there is quite a lot of garbage in here now at runtime (it does not de-duplicate entries added for bindings), so attempt to do a bit of that during serialization. Re-landing part of JuliaLang#58078 (cherry picked from commit 3ea60d2)
Instead of hiding the fragments of the method table in each TypeName, make one variable `Core.GlobalMethods` with access to all methods. The need to split them early for performance apparently had been long past since kwargs and constructors were already using a single table and cache anyways. Some new concepts introduced here: - A single Method can now be added to multiple functions. So instead of using eval in a for loop, we could define it just once (see example below). - Several fields (`max_args`, `name`, and `backedges`) were moved from MethodTable to their TypeName. - TypeName currently has a (user-modifiable) field called `singletonname`. If set to something other than `name`, it may be used for pretty printing of a singleton object using its "canonical" (unmangled) name, particularly for `function`. - `Core.Builtin` method table entries are even more normal now, with valid `sig` fields, and special logic to specifically prevent adding methods which would become ambiguous with them (as that would violate the tfuncs we have for them). - `Core.GlobalMethods` is a `Base.Experimental.@MethodTable GlobalMethods`. - Each `MethodTable` contains a separate `MethodCache` object for managing fast dispatch lookups. We may want to use this for the `Method` field containing the `invokes` list so that lookups there get more of the same optimizations as global calls. - Methods could be put into any number of different MethodTables (or none). The `Method.primary_world` field is intended to reflect whether it is currently put into the GlobalMethods table, and what world to use in the GlobalMethods table for running its generator, and otherwise is meaningless. - The lock for TypeName backedges is a single global lock now, in `Core.GlobalMethods.mc`. - The `backedges` in TypeName are stored on the "top-most" typename in the hierarchy, to enable efficient lookup (although we might want to consider replacing this entirely with a TypeMap). The "top-most" typename is the typename of the type closest to Any, after union-splitting, which doesn't have an intersection with Builtin (so Function and Any by implication continue to not require scanning for missing backedges since it is not permitted to add a Method applicable to all functions). - Support for having backedges from experimental method tables was removed since it was unsound and had been already replaced with staticdata.jl several months ago. - Documentation lookup for `IncludeInto` is fixed (previously attached only to `Main.include` instead of all `include` functions). Example: given this existing code in base/operators: for op in (:+, :*, :&, :|, :xor, :min, :max, :kron) @eval begin ($op)(a, b, c, xs...) = (@inline; afoldl($op, ($op)(($op)(a,b),c), xs...)) end end It could now instead be equivalently written as: let ops = Union{typeof(+), typeof(*), typeof(&), typeof(|), typeof(xor), typeof(min), typeof(max), typeof(kron)} (op::ops)(a, b, c, xs...) = (@inline; afoldl(op, (op)((op)(a,b),c), xs...)) end Fixes JuliaLang#57560 (cherry picked from commit 1735d8f)
Missed updates from early designs in JuliaLang#58131. Fix JuliaLang#58557 (cherry picked from commit 8ce50a0)
Introduce a new `jl_get_global_value` to do the new world-aware behavior, while preserving the old behavior for `jl_get_global`. Choose between `jl_get_global`, `jl_get_global_value`, and `jl_eval_global_var`, depending on what behavior is required. Also take this opportunity to fix some data race mistakes introduced by bindings (relaxed loads of jl_world_counter outside of assert) and lacking type asserts / unnecessary globals in precompile code. Fix JuliaLang#58097 Addresses post-review comment JuliaLang#57213 (comment), so this is already tested against by existing logic (cherry picked from commit 965d007)
The A15 was detected as M2; added codenames for easier future updates. Sources: - https://asahilinux.org/docs/hw/soc/soc-codenames/#socs - https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/arm/cpuid.h - https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AArch64/AArch64Processors.td#L428 Missing: - the M4 Pro and Max are missing (because they are missing from Apple's `cpuid.h`) Resolves JuliaLang#58278 --------- Co-authored-by: Christian Guinard <[email protected]> (cherry picked from commit 7cb88d6)
(cherry picked from commit f5e983e)
Specifically, content in an `__init__` block is handled by secret duplicate precompile logic, and any content generated by it was previously not eligible to be included into cache files. Fix JuliaLang#58449 (cherry picked from commit 2e158a4)
…Lang#58507) (cherry picked from commit 347fb7c)
This makes two changes to the backdate-warning-turned-error (JuliaLang#58266): 1. Fix a bug where the error would only trigger the first time. We do only want to print once per process, but of course, we do want to error every time if enabled. 2. If we are in speculative execution context (generators and speculatively run functions during inference), always use the UndefVarError. Effects from these functions are not supposed to be observable, and it's very confusing if the printed warning goes away when depwarns are enabled. This is marginally more breaking, but the burden is on generated function authors (which already have to be world-age aware and are somewhat more regularly broken) and is consistent with other things that are stronger errors in pure context. Fixes JuliaLang#58648 (cherry picked from commit d2cc061)
Update branch info to `release-1.12`, so that we can bump the SparseArrays.jl stdlib.
This reverts commit f15d417.
…s from packages succeed. TODO: remove this once alpha/beta is released # Conflicts: # VERSION # Conflicts: # VERSION # Conflicts: # VERSION # Conflicts: # VERSION
Prevent transparent huge pages (THP) overallocating pysical memory. Co-authored-by: Adnan Alhomssi <[email protected]>
Prepend `[signal (X) ]thread (Y) ` to each backtrace line that is displayed. Co-authored-by: Diogo Netto <[email protected]>
Also show the signal number when we have it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See also RAICode PR https://github.com/RelationalAI/raicode/pull/22602/commits