8000 Populate sparse-array tile extents in fresh query results by RicheyWorks · Pull Request #59 · jcuda/jcuda · GitHub
[go: up one dir, main page]

Skip to content

Populate sparse-array tile extents in fresh query results - #59

Draft
RicheyWorks wants to merge 1 commit into
jcuda:masterfrom
RicheyWorks:fix/sparse-array-tile-extent
Draft

RicheyWorks wants to merge 1 commit into
jcuda:masterfrom
RicheyWorks:fix/sparse-array-tile-extent

Conversation

@RicheyWorks
Copy link
Copy Markdown

cuArrayGetSparseProperties and cuMipmappedArrayGetSparseProperties return success but silently omit tile dimensions when given a fresh CUDA_ARRAY_SPARSE_PROPERTIES: its tileExtent field 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:

  • Published 12.6.0 DLL, -Xcheck:jni: four cases, two failures (Tile extent omitted from a successful query); preinitialized controls pass.
  • Rebuilt driver DLL with only this patch and pristine jcuda-common 9d41fb5: all four pass, zero failures/errors/skips and no JNI warnings. JVM library logging confirms the rebuilt DLL path.
  • Windows x86_64, RTX 4090/driver 617.42, Temurin JDK 22, declared JUnit 4.13.1; existing MSVC/CMake and checksum-verified official CUDA 12.6 workspace headers/import library. Java uses proposed parent Target Java 8 in the parent compiler configuration jcuda-parent#2 installed normally.
  • No overlapping sparse-property issue/PR found. This is one shared-output fix covering both entry points, independently branched from upstream master, without other pending patches.
  • No full CUDA suite, sparse mapping/sampling, runtime-API equivalent, other array formats/dimensionalities or other platforms validated. No ingestion pause, software installation or Processing-source changes.

CUDA contract: memory management / sparse array properties.

mvn -f JCudaJava/pom.xml -Dtest=JCudaDriverSparsePropertyTest "-DargLine=-Xcheck:jni -Djava.library.path=<rebuilt-driver-directory>" test

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.

1 participant

0