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

New version: Blobs v1.1.0 #123214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JuliaRegistrator
Copy link
Contributor

@JuliaRegistrator JuliaRegistrator commented Jan 17, 2025

## Compilation Performance Improvements
- We have removed the `@generated` functions in Blobs.jl, which makes this package much faster to compiler.
- In the process, we use some new compiler features, so the minimum supported Julia version is now 1.10.
- Runtime Perf was only _very minimally_ impacted, only in some cases. In 1.11 these impacts are resolved.

JuliaRegistrator referenced this pull request in RelationalAI-oss/Blobs.jl Jan 17, 2025
* Convert getindex(::Blob, ::Val{field}) from generated func.

- The produced code is unchanged, and the perf remains the same.
- This is tested by a new testitem

* Eliminate another generated function: self_size!

Managed via compiler annotations

This new function is ~10x faster than the older `@generated` function:
- ~10ms down to ~1ms

* Reorganize to hopefully minimize the generated part of unsafe_store!

* Recursion for computing blob_offset

* Get unsafe_load() un-generated as well! :)

* Bump to v1.1

* Switch unsafe_store! to non-generated as well.

2x slower, but less compile time so worth it.

* Improve compile-time perf on self_size computation

* De-val getindex, which fixes getproperty codegen. (Unclear why)

```
julia> @code_llvm debuginfo=:none (b->b.x)(b)
define void @"julia_#35_644"([3 x i64]* noalias nocapture noundef nonnull sret([3 x i64]) align 8 dereferenceable(24) %0, [3 x i64]* nocapture noundef nonnull readonly align 8 dereferenceable(24) %1) #0 {
top:
  %memcpy_refined_src1 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 2
  %2 = load i64, i64* %memcpy_refined_src1, align 8
  %3 = bitcast [3 x i64]* %1 to <2 x i64>*
  %4 = load <2 x i64>, <2 x i64>* %3, align 8
  %5 = bitcast [3 x i64]* %0 to <2 x i64>*
  store <2 x i64> %4, <2 x i64>* %5, align 8
  %newstruct.sroa.3.0..sroa_idx4 = getelementptr inbounds [3 x i64], [3 x i64]* %0, i64 0, i64 2
  store i64 %2, i64* %newstruct.sroa.3.0..sroa_idx4, align 8
  ret void
}
```

* Force fieldidx to const-fold, even for large (100 field) structs

According to @benchmark, this made compiling getproperty and setproperty
for 100-field structs take 2ms longer (7ms -> 9ms)

* Add tests for allocations

* Noinline the function to actually throw the assertion

---------

Co-authored-by: Sacha Verweij <[email protected]>
UUID: 163b9779-6631-5f90-a265-3de947924de8
Repo: https://github.com/RelationalAI-oss/Blobs.jl.git
Tree: e57267f4b0f92329f879add30e1badd4073b21d9

Registrator tree SHA: 17aec322677d9b81cdd6b9b9236b09a3f1374c6a
@JuliaRegistrator JuliaRegistrator force-pushed the registrator-blobs-163b9779-v1.1.0-3acc3b7384 branch from 6c8c2cb to eeda611 Compare January 17, 2025 17:57
JuliaRegistrator referenced this pull request in RelationalAI-oss/Blobs.jl Jan 17, 2025
latest release only supports 1.10, because of new use of compiler assume_effects
Copy link
Contributor

Hello, I am an automated registration bot. I help manage the registration process by checking your registration against a set of AutoMerge guidelines. If all these guidelines are met, this pull request will be merged automatically, completing your registration. It is strongly recommended to follow the guidelines, since otherwise the pull request needs to be manually reviewed and merged by a human.

1. AutoMerge Guidelines which are not met ❌

  • Does not meet sequential version number guideline: version 1.1.0 skips over 1.0.0. If this was not a mistake and you wish to merge this PR anyway, write a comment that says [merge approved].

  • This is a breaking change, but the release notes do not mention it. Please add a mention of the breaking change to the release notes.

    Example of adding release notes with breaking notice

    If you are using the comment bot @JuliaRegistrator, you can add release notes to this registration by re-triggering registration while specifying release notes:

    @JuliaRegistrator register
    
    Release notes:
    
    ## Breaking changes
    
    - Explanation of breaking change, ideally with upgrade tips
    - ...
    

    If you are using JuliaHub, trigger registration the same way you did the first time, but enter release notes that specify the breaking changes.

2. Needs action: here's what to do next

  1. Please try to update your package to conform to these guidelines. The General registry's README has an FAQ that can help figure out how to do so.
  2. After you have fixed the AutoMerge issues, simply retrigger Registrator, the same way you did in the initial registration. This will automatically update this pull request. You do not need to change the version number in your Project.toml file (unless the AutoMerge issue is that you skipped a version number).

If you need help fixing the AutoMerge issues, or want your pull request to be manually merged instead, please post a comment explaining what you need help with or why you would like this pull request to be manually merged. Then, send a message to the #pkg-registration channel in the public Julia Slack for better visibility.

3. To pause or stop registration

If you want to prevent this pull request from being auto-merged, simply leave a comment. If you want to post a comment without blocking auto-merging, you must include the text [noblock] in your comment.

Tip: You can edit blocking comments to add [noblock] in order to unblock auto-merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant