8000 Test driver transfers from positioned numeric buffer slices by RicheyWorks · Pull Request #53 · jcuda/jcuda · GitHub
[go: up one dir, main page]

Skip to content

Test driver transfers from positioned numeric buffer slices - #53

Draft
RicheyWorks wants to merge 1 commit into
jcuda:masterfrom
RicheyWorks:test/driver-buffer-slice-transfers
Draft

RicheyWorks wants to merge 1 commit into
jcuda:masterfrom
RicheyWorks:test/driver-buffer-slice-transfers

Conversation

@RicheyWorks
Copy link
Copy Markdown

Add real driver-transfer coverage for Pointer.toBuffer with a nonzero slice origin and a nonzero position, covering heap and direct buffers for byte, short, int, long, float and double. The existing position-aware copy tests concentrate on float buffers and the runtime host-to-host path.

Each of the 12 parameterized cases copies exactly three elements host→device→heap and verifies values 4,5,6 plus unchanged source position/limit. The largest device allocation is 24 bytes. A private executor thread owns each temporary context; both allocation and context are cleaned up in finally. No kernels, device resets, or global exception-mode changes.

This matrix exposed the shared-JNI copy-back bug addressed separately by jcuda/jcuda-common#4. It is a companion regression, not a second production fix. CharBuffer is omitted because its support is still pending in #51; the other draft Java fixes and #52 are not included in this independent branch.

Validation:

  • Published 12.6.0 driver DLL: all12 pass normally; all12 fail with zero output under -Xcheck:jni because of the shared release-mode bug.
  • Rebuilt complete driver DLL with the shared fix: all12 pass under -Xcheck:jni, with the exact loaded DLL confirmed by JVM logging.
  • Windows x86_64, RTX4090/driver617.42, Temurin22, Maven/JUnit4.13.1; the disclosed task-local parent source/target8 adaptation and workspace CUDA12.6 headers/import library were used. No POM/toolchain change included.
  • Other GPU workloads were not paused or reset. This is focused transfer coverage, not a full CUDA suite or performance benchmark.

Example focused invocation after rebuilding the native driver with the common fix:

mvn -f JCudaJava/pom.xml -Dtest=JCudaDriverBufferSliceTest "-DargLine=-Xcheck:jni -Djava.library.path=<rebuilt-native-library-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