Repository navigation
Conversation
…ay library Persistent translation-cache keys fingerprint the connectivity tables in the offset provider. A process-pool compile worker only receives a host (numpy) copy of each table, while serial and thread compilation key the original, so on GPU backends the two keys differed and the cache written in one mode missed in the other. Gather connectivities now get their own deconstructor: domain, codomain, skip value and a content fingerprint of the host table, without the connectivity class or array library. The table fingerprint is memoized per connectivity, so a device table is copied to the host once per process.
Contributor
Author
|
🤖 Written by an agent on behalf of @havogt |
…ory order A host copy of a connectivity table can come back in a different memory order than the original (C vs. F), which split the persistent cache key again for F-ordered tables. Translation does not depend on table strides, so the table content is fingerprinted in C order.
Contributor
Author
|
This is probably not the solution. Instead conceptually the more promising direction is to avoid passing connectivities verbatim into the optimization pipeline, but a "canonical" connectivity (probably host side). This would also fix the problem in #2924. |
2 tasks done
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
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.
Description
The persistent translation-cache key fingerprints the connectivity tables in the offset provider. A process-pool compile worker (
GT4PY_BUILD_JOBS_MODE=process) only receives a host copy of each table, aNumPyArrayConnectivityField. Serial and thread compilation fingerprint the original table instead, which on GPU backends is aCuPyArrayConnectivityField. The two fingerprint differently, so ondace_gpu/gtfn_gpua cache filled in one mode misses in the other.A gather connectivity is now fingerprinted by its domain, codomain, skip value and a content fingerprint of its host table, independent of its class and array library. The content fingerprint is memoized per field, so a device table is copied to the host once per process, not on every fingerprint as before.