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

make objectid effects total #52119

Merged
merged 1 commit into from
Nov 15, 2023
Merged

make objectid effects total #52119

merged 1 commit into from
Nov 15, 2023

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Nov 10, 2023

Avoids the need to rehash most dictionaries on reload.

System image data size increase is about 109MB -> 112MB, since there are about 130k Arrays, 75k CodeInstances, 30k Methods, 80k TypeMapEntries, 75k MethodInstance, and 36k Core.Bindings, and other mutable objects.

@oscardssmith oscardssmith added the needs nanosoldier run This PR should have benchmarks run on it label Nov 10, 2023
@JeffBezanson
Copy link
Member

Very nice. I think it's well worth it to have object_id be total and not have to worry about rehashing things, especially for types in other packages.

@vtjnash
Copy link
Member Author

vtjnash commented Nov 11, 2023

@nanosoldier runbenchmarks("inference" || "collections", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - no performance regressions were detected. A full report can be found here.

@vtjnash vtjnash removed the needs nanosoldier run This PR should have benchmarks run on it label Nov 14, 2023
Avoids the need to rehash most dictionaries on reload.

System image data size increase is about 109MB -> 112MB, since there are
about 130k Arrays, 75k CodeInstances, 30k Methods, 80k TypeMapEntries,
75k MethodInstance, and 36k Core.Bindings, and other mutable objects.
@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Nov 14, 2023
@vtjnash vtjnash merged commit a26e23a into master Nov 15, 2023
3 of 7 checks passed
@vtjnash vtjnash deleted the jn/stable-objectid branch November 15, 2023 01:13
@giordano giordano removed the merge me PR is reviewed. Merge when all tests are passing label Nov 15, 2023
vchuravy added a commit that referenced this pull request Apr 13, 2024
For GPUCompiler we would like to support a native on disk cache of LLVM
IR.
One of the longstanding issues has been the cache invalidation of such
an on disk cache.

With #52233 we now have an integrated cache for the inference results
and we can rely
on `CodeInstance` to be stable across sessions. Due to #52119 we can
also rely on the
`objectid` to be stable. 

My inital thought was to key the native disk cache in GPUCompiler on the
objectid of
the corresponding CodeInstance (+ some compilation parameters).

While discussing this with @rayegun yesterday we noted that having a
CodeInstance with
the same objectid might not be enough provenance. E.g we are not
gurantueed that the
CodeInstance is from the same build artifact and the same precise source
code.

For the package images we are tracking this during loading and validate
all contents
at once, and we keep explicitly track of the provenance chain.

This PR adds a lookup up table where we map from "external_blobs" e.g.
loaded images,
to the corresponding top module of each image, and uses this to
determine the
build_id of the package image.
vchuravy added a commit that referenced this pull request Apr 19, 2024
For GPUCompiler we would like to support a native on disk cache of LLVM
IR.
One of the longstanding issues has been the cache invalidation of such
an on disk cache.

With #52233 we now have an integrated cache for the inference results
and we can rely
on `CodeInstance` to be stable across sessions. Due to #52119 we can
also rely on the
`objectid` to be stable.

My inital thought was to key the native disk cache in GPUCompiler on the
objectid of
the corresponding CodeInstance (+ some compilation parameters).

While discussing this with @rayegun yesterday we noted that having a
CodeInstance with
the same objectid might not be enough provenance. E.g we are not
gurantueed that the
CodeInstance is from the same build artifact and the same precise source
code.

For the package images we are tracking this during loading and validate
all contents
at once, and we keep explicitly track of the provenance chain.

This PR adds a lookup up table where we map from "external_blobs" e.g.
loaded images,
to the corresponding top module of each image, and uses this to
determine the
build_id of the package image.

(cherry picked from commit d47cbf6)
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.

6 participants