Repository navigation
Populate sparse-array tile extents in fresh query results - #59
Draft
RicheyWorks wants to merge 1 commit into
Draft
RicheyWorks wants to merge 1 commit into
RicheyWorks wants to merge 1 commit into
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
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.
cuArrayGetSparsePropertiesandcuMipmappedArrayGetSparsePropertiesreturn success but silently omit tile dimensions when given a freshCUDA_ARRAY_SPARSE_PROPERTIES: itstileExtentfield defaults to null, and the shared JNI output helper only copies dimensions if the caller has created that nested object manually.Cache the tile-extent class/constructor with the existing JNI initialization conventions, create and attach the nested result when absent, then copy all three dimensions. Continue updating an existing tile object in place. Java/JNI signatures, sparse allocation and data mapping are unchanged; an object-creation failure preserves the pending JVM exception.
Four real driver cases cover plain/mipmapped sparse arrays with fresh/preinitialized result objects. First query a preinitialized control, then compare every returned property and require the actual tile dimensions; existing-object identity and overwritten sentinel values are checked. Device capability is checked, each context runs on a private CPU thread, and arrays/contexts are destroyed in
finally. Resources are 512x512 single-byte-channel sparse arrays (three levels for mipmaps), with no physical tile backing mapped, transfers, kernels or reset.Verification:
-Xcheck:jni: four cases, two failures (Tile extent omitted from a successful query); preinitialized controls pass.jcuda-common9d41fb5: all four pass, zero failures/errors/skips and no JNI warnings. JVM library logging confirms the rebuilt DLL path.CUDA contract: memory management / sparse array properties.