Skip to content

feat(Kernel): add local message passing helpers#223

Open
Silas-Sitri wants to merge 1 commit into
Syncleus:masterfrom
Silas-Sitri:bounty-43-local-message-passing
Open

feat(Kernel): add local message passing helpers#223
Silas-Sitri wants to merge 1 commit into
Syncleus:masterfrom
Silas-Sitri:bounty-43-local-message-passing

Conversation

@Silas-Sitri
Copy link
Copy Markdown

Summary

  • add Kernel.localExchange(...) for integer work-item value exchange inside a work-group
  • add Kernel.localBroadcast(...) for integer work-group broadcasts
  • emit OpenCL helper functions only when the corresponding message-passing API is used
  • add codegen and Java thread-pool runtime coverage

Notes

These helpers use Aparapi local memory and local barriers. Callers must pass a @Local buffer, or a buffer named with Kernel.LOCAL_SUFFIX, and all work-items in the work-group must reach the calls in the same order.

Closes #43

Testing

  • /tmp/apache-maven-3.9.16/bin/mvn -q test-compile
  • JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 /tmp/apache-maven-3.9.16/bin/mvn -q -DskipTests package
  • manual JUnit: java -cp ... org.junit.runner.JUnitCore com.aparapi.codegen.test.LocalMessagePassingTest com.aparapi.runtime.LocalMessagePassingTest -> OK (3 tests)
  • git diff --check

Full mvn test could not run in this local Java 17 environment because the existing Surefire config passes the Java 8-era option -XX:MaxPermSize=512m, which Java 17 rejects before tests start.

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.

[Bounty $50] Easy message passing interface

2 participants