From gfrost at openjdk.org Wed Oct 1 10:53:09 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 1 Oct 2025 10:53:09 GMT Subject: git: openjdk/babylon: code-reflection: Hat move config to core Message-ID: Changeset: d288efa1 Branch: code-reflection Author: Gary Frost Date: 2025-10-01 10:51:36 +0000 URL: https://git.openjdk.org/babylon/commit/d288efa194a2eac83061760abd9ae053e2289199 Hat move config to core ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaBackend.java ! hat/backends/ffi/mock/src/main/java/hat/backend/ffi/MockBackend.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackendDriver.java - hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIConfig.java ! hat/backends/ffi/shared/src/main/native/include/config.h ! hat/core/src/main/java/hat/Config.java + hat/core/src/main/java/hat/FFIConfigCreator.java + hat/core/src/main/java/hat/codebuilders/C99HATConfigBuilder.java ! hat/core/src/main/java/hat/codebuilders/CodeBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilder.java ! hat/examples/experiments/src/main/java/experiments/Mesh.java ! hat/examples/experiments/src/main/java/experiments/MinBufferTest.java ! hat/hat/bld ! hat/hat/clean = hat/hat/obld = hat/hat/oclean = hat/hat/orun = hat/hat/osanity = hat/hat/otest ! hat/hat/run ! hat/hat/sanity ! hat/hat/test From gfrost at openjdk.org Wed Oct 1 10:54:51 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 1 Oct 2025 10:54:51 GMT Subject: [code-reflection] Integrated: Hat move config to core Message-ID: By moving Config up to core (from FFI) we can take advantage of it from anywhere in the HAT code. At present we still only access it from FFI. I plan to make more general changes in future. Also switched `java @hat/bld` to actually use the new `job.jar` based build (same for @hat/run ... sanity .. test clean etc) Have not removed the Script based tools. But will soon. If you see a problem you can revert to the prev version using `java @hat/obld ....` instead of `java @hat/bld ...` ------------- Commit messages: - Moved config out of ffi also switched to using job.jar based bld,run etc - Moved config out of ffi also switched to using job.jar based bld,run etc Changes: https://git.openjdk.org/babylon/pull/589/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=589&range=00 Stats: 804 lines in 25 files changed: 382 ins; 325 del; 97 mod Patch: https://git.openjdk.org/babylon/pull/589.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/589/head:pull/589 PR: https://git.openjdk.org/babylon/pull/589 From gfrost at openjdk.org Wed Oct 1 10:54:53 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 1 Oct 2025 10:54:53 GMT Subject: [code-reflection] Integrated: Hat move config to core In-Reply-To: References: Message-ID: On Wed, 1 Oct 2025 10:48:03 GMT, Gary Frost wrote: > By moving Config up to core (from FFI) we can take advantage of it from anywhere in the HAT code. > > At present we still only access it from FFI. I plan to make more general changes in future. > > Also switched `java @hat/bld` to actually use the new `job.jar` based build (same for @hat/run ... sanity .. test clean etc) > > Have not removed the Script based tools. But will soon. If you see a problem you can revert to the prev version using `java @hat/obld ....` instead of `java @hat/bld ...` This pull request has now been integrated. Changeset: d288efa1 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/d288efa194a2eac83061760abd9ae053e2289199 Stats: 804 lines in 25 files changed: 382 ins; 325 del; 97 mod Hat move config to core ------------- PR: https://git.openjdk.org/babylon/pull/589 From jfumero at openjdk.org Wed Oct 1 11:21:18 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 11:21:18 GMT Subject: [code-reflection] RFR: [hat] Example of HAT for 2D Matmul with register tiling Message-ID: There was an example with accesses to local memory specific to the CUDA programming model. This has been fixed and now it is compatible with both the OpenCL and CUDA backends of HAT. How to run? HAT=SHOW_CODE java @hat/run ffi-opencl matmul 2DREGISTERTILING ------------- Commit messages: - [hat] Example of HAT for 2D Matmul with register tiling Changes: https://git.openjdk.org/babylon/pull/590/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=590&range=00 Stats: 295 lines in 5 files changed: 196 ins; 75 del; 24 mod Patch: https://git.openjdk.org/babylon/pull/590.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/590/head:pull/590 PR: https://git.openjdk.org/babylon/pull/590 From jfumero at openjdk.org Wed Oct 1 11:54:42 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 11:54:42 GMT Subject: git: openjdk/babylon: code-reflection: [hat] Example of HAT for 2D Matmul with register tiling Message-ID: <4ca230e5-4c86-444a-b77d-bdb6894cda19@openjdk.org> Changeset: 8e9bc5b2 Branch: code-reflection Author: Juan Fumero Date: 2025-10-01 11:52:48 +0000 URL: https://git.openjdk.org/babylon/commit/8e9bc5b2db96aa7b2f0879722237ecbfe98b841d [hat] Example of HAT for 2D Matmul with register tiling ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java - hat/core/src/main/java/hat/CUDARange.java ! hat/examples/matmul/src/main/java/matmul/Main.java ! hat/tests/src/main/java/oracle/code/hat/TestArrays.java ! hat/tests/src/main/java/oracle/code/hat/TestMatMul.java From jfumero at openjdk.org Wed Oct 1 11:55:29 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 11:55:29 GMT Subject: [code-reflection] Integrated: [hat] Example of HAT for 2D Matmul with register tiling In-Reply-To: References: Message-ID: On Wed, 1 Oct 2025 11:14:43 GMT, Juan Fumero wrote: > There was an example with accesses to local memory specific to the CUDA programming model. This has been fixed and now it is compatible with both the OpenCL and CUDA backends of HAT. > > How to run? > > HAT=SHOW_CODE java @hat/run ffi-opencl matmul 2DREGISTERTILING This pull request has now been integrated. Changeset: 8e9bc5b2 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/8e9bc5b2db96aa7b2f0879722237ecbfe98b841d Stats: 295 lines in 5 files changed: 196 ins; 75 del; 24 mod [hat] Example of HAT for 2D Matmul with register tiling ------------- PR: https://git.openjdk.org/babylon/pull/590 From jfumero at openjdk.org Wed Oct 1 13:30:34 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 13:30:34 GMT Subject: [code-reflection] RFR: [hat] Fix cuda set context Message-ID: <3mMhtRkpi8-TxcFbC8yxFs11XX9wFZhNFoCnN21OCC4=.72529812-b27d-463e-bbc8-f59d20dfc184@github.com> When running Java multi-threaded applications with the HAT CUDA Backend we need to set the current context before building the kernel. This patch fixes this. Heal application should work now for the CUDA backend. ------------- Commit messages: - [hat] Fix cuda set context Changes: https://git.openjdk.org/babylon/pull/591/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=591&range=00 Stats: 4 lines in 3 files changed: 1 ins; 1 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/591.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/591/head:pull/591 PR: https://git.openjdk.org/babylon/pull/591 From jfumero at openjdk.org Wed Oct 1 13:48:27 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 13:48:27 GMT Subject: git: openjdk/babylon: code-reflection: [hat] Fix cuda set context Message-ID: <879a0ee0-42f4-4706-9bba-490d3f172254@openjdk.org> Changeset: 0afb4ad7 Branch: code-reflection Author: Juan Fumero Date: 2025-10-01 13:45:50 +0000 URL: https://git.openjdk.org/babylon/commit/0afb4ad7b6c65c923288299abf3b72e0c324244f [hat] Fix cuda set context ! hat/backends/ffi/cuda/src/main/native/cpp/cuda_backend.cpp ! hat/backends/ffi/cuda/src/main/native/cpp/cuda_backend_queue.cpp ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackendDriver.java From jfumero at openjdk.org Wed Oct 1 13:48:57 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 13:48:57 GMT Subject: [code-reflection] Integrated: [hat] Fix cuda set context In-Reply-To: <3mMhtRkpi8-TxcFbC8yxFs11XX9wFZhNFoCnN21OCC4=.72529812-b27d-463e-bbc8-f59d20dfc184@github.com> References: <3mMhtRkpi8-TxcFbC8yxFs11XX9wFZhNFoCnN21OCC4=.72529812-b27d-463e-bbc8-f59d20dfc184@github.com> Message-ID: On Wed, 1 Oct 2025 13:24:47 GMT, Juan Fumero wrote: > When running Java multi-threaded applications with the HAT CUDA Backend we need to set the current context before building the kernel. This patch fixes this. > > Heal application should work now for the CUDA backend. This pull request has now been integrated. Changeset: 0afb4ad7 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/0afb4ad7b6c65c923288299abf3b72e0c324244f Stats: 4 lines in 3 files changed: 1 ins; 1 del; 2 mod [hat] Fix cuda set context ------------- PR: https://git.openjdk.org/babylon/pull/591 From jfumero at openjdk.org Wed Oct 1 14:09:20 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 14:09:20 GMT Subject: [code-reflection] RFR: [hat] rollback CUDA specific scheduler Message-ID: <7BDFWP9sWCcL0ZXx19oZcjuiVMnRwRcRXXeBHCOcMIY=.a3fdc886-33f7-4e22-ba86-0db2cd3130c5@github.com> Remove the CUDA Specific scheduler from the kernel context. ------------- Commit messages: - [hat] rollback CUDA specific scheduler Changes: https://git.openjdk.org/babylon/pull/592/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=592&range=00 Stats: 17 lines in 3 files changed: 0 ins; 16 del; 1 mod Patch: https://git.openjdk.org/babylon/pull/592.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/592/head:pull/592 PR: https://git.openjdk.org/babylon/pull/592 From gfrost at openjdk.org Wed Oct 1 14:25:04 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 1 Oct 2025 14:25:04 GMT Subject: [code-reflection] Integrated: initial prototype of prefix sum experiment Message-ID: This will be a good demonstrator for recent array view and local memory work. Also the basis for a reduction based violajones implementation. I also added matmul.iml so we can view matmul in intellij project ------------- Commit messages: - initial prototype of prefix sum experiment Changes: https://git.openjdk.org/babylon/pull/593/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=593&range=00 Stats: 341 lines in 3 files changed: 341 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/593.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/593/head:pull/593 PR: https://git.openjdk.org/babylon/pull/593 From gfrost at openjdk.org Wed Oct 1 14:25:05 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 1 Oct 2025 14:25:05 GMT Subject: [code-reflection] Integrated: initial prototype of prefix sum experiment In-Reply-To: References: Message-ID: On Wed, 1 Oct 2025 14:04:03 GMT, Gary Frost wrote: > This will be a good demonstrator for recent array view and local memory work. > > Also the basis for a reduction based violajones implementation. > > I also added matmul.iml so we can view matmul in intellij project This pull request has now been integrated. Changeset: 161d5835 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/161d583585ceb2e2ecca2c95649acd59560c1bf9 Stats: 341 lines in 3 files changed: 341 ins; 0 del; 0 mod initial prototype of prefix sum experiment ------------- PR: https://git.openjdk.org/babylon/pull/593 From gfrost at openjdk.org Wed Oct 1 14:25:59 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 1 Oct 2025 14:25:59 GMT Subject: git: openjdk/babylon: code-reflection: initial prototype of prefix sum experiment Message-ID: <0278c455-c966-47cd-b5c3-521f2fb460b3@openjdk.org> Changeset: 161d5835 Branch: code-reflection Author: Gary Frost Date: 2025-10-01 14:22:01 +0000 URL: https://git.openjdk.org/babylon/commit/161d583585ceb2e2ecca2c95649acd59560c1bf9 initial prototype of prefix sum experiment + hat/examples/experiments/src/main/java/experiments/PrefixSum.java ! hat/intellij/.idea/modules.xml + hat/intellij/example_matmul.iml From jfumero at openjdk.org Wed Oct 1 14:33:12 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 14:33:12 GMT Subject: git: openjdk/babylon: code-reflection: [hat] rollback CUDA specific scheduler Message-ID: <5ccfb1dc-f47a-455b-a6a9-6c0fbea96b6c@openjdk.org> Changeset: 6aa54542 Branch: code-reflection Author: Juan Fumero Date: 2025-10-01 14:30:54 +0000 URL: https://git.openjdk.org/babylon/commit/6aa54542593a463a36d1e8b54b190519ab05e86c [hat] rollback CUDA specific scheduler ! hat/backends/ffi/cuda/src/main/native/cpp/cuda_backend_queue.cpp ! hat/backends/ffi/shared/src/main/native/include/shared.h ! hat/core/src/main/java/hat/buffer/KernelContext.java From jfumero at openjdk.org Wed Oct 1 14:33:35 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 14:33:35 GMT Subject: [code-reflection] Integrated: [hat] rollback CUDA specific scheduler In-Reply-To: <7BDFWP9sWCcL0ZXx19oZcjuiVMnRwRcRXXeBHCOcMIY=.a3fdc886-33f7-4e22-ba86-0db2cd3130c5@github.com> References: <7BDFWP9sWCcL0ZXx19oZcjuiVMnRwRcRXXeBHCOcMIY=.a3fdc886-33f7-4e22-ba86-0db2cd3130c5@github.com> Message-ID: On Wed, 1 Oct 2025 14:01:00 GMT, Juan Fumero wrote: > Remove the CUDA Specific scheduler from the kernel context. This pull request has now been integrated. Changeset: 6aa54542 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/6aa54542593a463a36d1e8b54b190519ab05e86c Stats: 17 lines in 3 files changed: 0 ins; 16 del; 1 mod [hat] rollback CUDA specific scheduler ------------- PR: https://git.openjdk.org/babylon/pull/592 From jfumero at openjdk.org Wed Oct 1 16:47:58 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 16:47:58 GMT Subject: [code-reflection] RFR: [hat] clean-up - removed duplicated sample Message-ID: Clean-up samples - removed duplicated version ------------- Commit messages: - [hat] clean-up - removed duplicated sample Changes: https://git.openjdk.org/babylon/pull/594/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=594&range=00 Stats: 445 lines in 2 files changed: 0 ins; 444 del; 1 mod Patch: https://git.openjdk.org/babylon/pull/594.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/594/head:pull/594 PR: https://git.openjdk.org/babylon/pull/594 From jfumero at openjdk.org Wed Oct 1 16:48:55 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 16:48:55 GMT Subject: git: openjdk/babylon: code-reflection: [hat] clean-up - removed duplicated sample Message-ID: <4fe7ae54-2e97-4c41-b63c-872694d4c5c5@openjdk.org> Changeset: 1cfba3b3 Branch: code-reflection Author: Juan Fumero Date: 2025-10-01 16:48:05 +0000 URL: https://git.openjdk.org/babylon/commit/1cfba3b3a7acb15babae5b55b4b3a1eefd48d8c3 [hat] clean-up - removed duplicated sample ! hat/examples/matmul/src/main/java/matmul/Main.java ! hat/tests/src/main/java/oracle/code/hat/TestMatMul.java From jfumero at openjdk.org Wed Oct 1 16:50:29 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 1 Oct 2025 16:50:29 GMT Subject: [code-reflection] Integrated: [hat] clean-up - removed duplicated sample In-Reply-To: References: Message-ID: On Wed, 1 Oct 2025 16:42:19 GMT, Juan Fumero wrote: > Clean-up samples - removed duplicated version This pull request has now been integrated. Changeset: 1cfba3b3 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/1cfba3b3a7acb15babae5b55b4b3a1eefd48d8c3 Stats: 445 lines in 2 files changed: 0 ins; 444 del; 1 mod [hat] clean-up - removed duplicated sample ------------- PR: https://git.openjdk.org/babylon/pull/594 From jfumero at openjdk.org Thu Oct 2 08:27:02 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 2 Oct 2025 08:27:02 GMT Subject: [code-reflection] RFR: [hat] testing framework updated to use the new scripts Message-ID: Testing framework updated to use the new scripts ------------- Commit messages: - [hat] testing framework updated to use the new scripts Changes: https://git.openjdk.org/babylon/pull/595/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=595&range=00 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/595.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/595/head:pull/595 PR: https://git.openjdk.org/babylon/pull/595 From jfumero at openjdk.org Thu Oct 2 08:33:59 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 2 Oct 2025 08:33:59 GMT Subject: [code-reflection] Integrated: [hat] testing framework updated to use the new scripts In-Reply-To: References: Message-ID: On Thu, 2 Oct 2025 08:21:13 GMT, Juan Fumero wrote: > Testing framework updated to use the new scripts This pull request has now been integrated. Changeset: 788baa20 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/788baa204e68c0099f9856814f38ce45f2e3aa4e Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod [hat] testing framework updated to use the new scripts ------------- PR: https://git.openjdk.org/babylon/pull/595 From jfumero at openjdk.org Thu Oct 2 08:34:39 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 2 Oct 2025 08:34:39 GMT Subject: git: openjdk/babylon: code-reflection: [hat] testing framework updated to use the new scripts Message-ID: Changeset: 788baa20 Branch: code-reflection Author: Juan Fumero Date: 2025-10-02 08:31:13 +0000 URL: https://git.openjdk.org/babylon/commit/788baa204e68c0099f9856814f38ce45f2e3aa4e [hat] testing framework updated to use the new scripts ! hat/scripts/remoteTesting.sh From jfumero at openjdk.org Thu Oct 2 10:41:36 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 2 Oct 2025 10:41:36 GMT Subject: [code-reflection] Integrated: [hat] Remote tests script fixed + add ArrayViews Message-ID: - Remote tests script fixed - Add ArrayViews in the test suite ------------- Commit messages: - [hat] Remote tests script fixed + add ArrayViews Changes: https://git.openjdk.org/babylon/pull/596/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=596&range=00 Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/babylon/pull/596.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/596/head:pull/596 PR: https://git.openjdk.org/babylon/pull/596 From jfumero at openjdk.org Thu Oct 2 10:41:44 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 2 Oct 2025 10:41:44 GMT Subject: git: openjdk/babylon: code-reflection: [hat] Remote tests script fixed + add ArrayViews Message-ID: <7ffc19bb-a90a-4856-8654-9bb6c3f6149a@openjdk.org> Changeset: 5a905ae8 Branch: code-reflection Author: Juan Fumero Date: 2025-10-02 10:38:38 +0000 URL: https://git.openjdk.org/babylon/commit/5a905ae8e211ab0aff77cd31eaa0f6fe65b2cfa0 [hat] Remote tests script fixed + add ArrayViews ! hat/hat.java ! hat/scripts/remoteTesting.sh From jfumero at openjdk.org Thu Oct 2 10:41:37 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 2 Oct 2025 10:41:37 GMT Subject: [code-reflection] Integrated: [hat] Remote tests script fixed + add ArrayViews In-Reply-To: References: Message-ID: On Thu, 2 Oct 2025 10:32:40 GMT, Juan Fumero wrote: > - Remote tests script fixed > - Add ArrayViews in the test suite This pull request has now been integrated. Changeset: 5a905ae8 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/5a905ae8e211ab0aff77cd31eaa0f6fe65b2cfa0 Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod [hat] Remote tests script fixed + add ArrayViews ------------- PR: https://git.openjdk.org/babylon/pull/596 From gfrost at openjdk.org Thu Oct 2 13:23:14 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 2 Oct 2025 13:23:14 GMT Subject: [code-reflection] Integrated: config now accessible from all backends Message-ID: Config now setup for all backends. This allows us to test capabilities (such as SHOW_CODE) in all backends We should lean on this rather than Boolean.get(propName). ------------- Commit messages: - config now accessible from all backends Changes: https://git.openjdk.org/babylon/pull/597/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=597&range=00 Stats: 290 lines in 30 files changed: 153 ins; 52 del; 85 mod Patch: https://git.openjdk.org/babylon/pull/597.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/597/head:pull/597 PR: https://git.openjdk.org/babylon/pull/597 From gfrost at openjdk.org Thu Oct 2 13:23:14 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 2 Oct 2025 13:23:14 GMT Subject: [code-reflection] Integrated: config now accessible from all backends In-Reply-To: References: Message-ID: On Thu, 2 Oct 2025 13:15:53 GMT, Gary Frost wrote: > Config now setup for all backends. > > This allows us to test capabilities (such as SHOW_CODE) in all backends > > We should lean on this rather than Boolean.get(propName). This pull request has now been integrated. Changeset: 469e6ab3 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/469e6ab36eafbcc3badc999c66e59d6ef825a61d Stats: 290 lines in 30 files changed: 153 ins; 52 del; 85 mod config now accessible from all backends ------------- PR: https://git.openjdk.org/babylon/pull/597 From gfrost at openjdk.org Thu Oct 2 13:24:36 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 2 Oct 2025 13:24:36 GMT Subject: git: openjdk/babylon: code-reflection: config now accessible from all backends Message-ID: Changeset: 469e6ab3 Branch: code-reflection Author: Gary Frost Date: 2025-10-02 13:20:05 +0000 URL: https://git.openjdk.org/babylon/commit/469e6ab36eafbcc3badc999c66e59d6ef825a61d config now accessible from all backends ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaBackend.java ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaDeviceInfo.java ! hat/backends/ffi/mock/src/main/java/hat/backend/ffi/MockBackend.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLBackend.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLDeviceInfo.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackendDriver.java ! hat/backends/ffi/shared/src/main/native/include/config.h ! hat/backends/java/seq/src/main/java/hat/backend/java/JavaSequentialBackend.java ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLBackend.java ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/C99JExtractedBackend.java ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/JExtractedBackend.java ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/JExtractedBackendDriver.java ! hat/core/src/main/java/hat/Accelerator.java ! hat/core/src/main/java/hat/ComputeContext.java ! hat/core/src/main/java/hat/Config.java ! hat/core/src/main/java/hat/FFIConfigCreator.java ! hat/core/src/main/java/hat/backend/Backend.java ! hat/core/src/main/java/hat/backend/BackendAdaptor.java ! hat/core/src/main/java/hat/backend/DebugBackend.java ! hat/core/src/main/java/hat/backend/java/JavaBackend.java ! hat/core/src/main/java/hat/buffer/ArgArray.java ! hat/core/src/main/java/hat/callgraph/CallGraph.java ! hat/core/src/main/java/hat/callgraph/ComputeCallGraph.java ! hat/core/src/main/java/hat/codebuilders/C99HATConfigBuilder.java ! hat/examples/experiments/src/main/java/experiments/Mesh.java ! hat/examples/experiments/src/main/java/experiments/MinBufferTest.java ! hat/examples/mandel/src/main/java/mandel/Main.java ! hat/examples/violajones/src/main/java/violajones/Main.java From gfrost at openjdk.org Thu Oct 2 13:32:07 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 2 Oct 2025 13:32:07 GMT Subject: [code-reflection] Integrated: hat.java now scans the tests.jar for tests to run Message-ID: Previously we ha dto add each new test suite to `hat.java` now we scan the jar file for test suites. ------------- Commit messages: - hat.java now scans the tests.jar for tests to run - hat.java now scans the tests.jar for tests to run Changes: https://git.openjdk.org/babylon/pull/598/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=598&range=00 Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.org/babylon/pull/598.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/598/head:pull/598 PR: https://git.openjdk.org/babylon/pull/598 From gfrost at openjdk.org Thu Oct 2 13:32:07 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 2 Oct 2025 13:32:07 GMT Subject: [code-reflection] Integrated: hat.java now scans the tests.jar for tests to run In-Reply-To: References: Message-ID: On Thu, 2 Oct 2025 13:23:46 GMT, Gary Frost wrote: > Previously we ha dto add each new test suite to `hat.java` now we scan the jar file for test suites. This pull request has now been integrated. Changeset: 4fbdcd4a Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/4fbdcd4a421cf23dfaf33ee3d9a799d5abc6ccaa Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod hat.java now scans the tests.jar for tests to run ------------- PR: https://git.openjdk.org/babylon/pull/598 From gfrost at openjdk.org Thu Oct 2 13:32:59 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 2 Oct 2025 13:32:59 GMT Subject: git: openjdk/babylon: code-reflection: hat.java now scans the tests.jar for tests to run Message-ID: <7e9b1775-c17a-4381-91a1-6698c62eb5cb@openjdk.org> Changeset: 4fbdcd4a Branch: code-reflection Author: Gary Frost Date: 2025-10-02 13:29:03 +0000 URL: https://git.openjdk.org/babylon/commit/4fbdcd4a421cf23dfaf33ee3d9a799d5abc6ccaa hat.java now scans the tests.jar for tests to run ! hat/hat.java From duke at openjdk.org Thu Oct 2 23:12:47 2025 From: duke at openjdk.org (Ruby Chen) Date: Thu, 2 Oct 2025 23:12:47 GMT Subject: [code-reflection] RFR: Remove noModuleOp and bufferTagging flags Message-ID: Phase out the backend that doesn't use `ModuleOp`. Also make `bufferTagging` run by default. ------------- Commit messages: - Remove noModuleOp and bufferTagging flags Changes: https://git.openjdk.org/babylon/pull/599/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=599&range=00 Stats: 112 lines in 12 files changed: 15 ins; 77 del; 20 mod Patch: https://git.openjdk.org/babylon/pull/599.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/599/head:pull/599 PR: https://git.openjdk.org/babylon/pull/599 From duke at openjdk.org Fri Oct 3 14:52:06 2025 From: duke at openjdk.org (duke) Date: Fri, 3 Oct 2025 14:52:06 GMT Subject: [code-reflection] RFR: Remove noModuleOp and bufferTagging flags In-Reply-To: References: Message-ID: <4rWTe4AnWQ0pbxoRMdP-bnN4LiSNXQSUbHKCgeA7l1M=.91249acc-7ddb-4080-b2bb-a1d3b806fcad@github.com> On Thu, 2 Oct 2025 23:06:07 GMT, Ruby Chen wrote: > Phase out the backend that doesn't use `ModuleOp`. Also make `bufferTagging` run by default. @rbrchen Your change (at version 56b48cf35bb0b559eabe55b072772f107ebc66cd) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/babylon/pull/599#issuecomment-3366013209 From gfrost at openjdk.org Fri Oct 3 15:03:37 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 3 Oct 2025 15:03:37 GMT Subject: git: openjdk/babylon: code-reflection: Remove noModuleOp and bufferTagging flags Message-ID: <7941606c-8edf-411f-8a46-a4978ae0c01e@openjdk.org> Changeset: 09e34f28 Branch: code-reflection Author: Ruby Chen Committer: Gary Frost Date: 2025-10-03 15:01:47 +0000 URL: https://git.openjdk.org/babylon/commit/09e34f28441ed95fcc218a0c8b65e3d8e0c9190d Remove noModuleOp and bufferTagging flags ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaBackend.java ! hat/backends/ffi/mock/src/main/java/hat/backend/ffi/MockBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/core/src/main/java/hat/BufferTagger.java ! hat/core/src/main/java/hat/buffer/ArgArray.java ! hat/core/src/main/java/hat/callgraph/CallGraph.java ! hat/core/src/main/java/hat/callgraph/ComputeCallGraph.java ! hat/core/src/main/java/hat/callgraph/KernelCallGraph.java ! hat/hat.java ! hat/hat/Script.java ! hat/hat/run.java ! hat/hat/test.java From duke at openjdk.org Fri Oct 3 15:04:14 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 3 Oct 2025 15:04:14 GMT Subject: [code-reflection] Integrated: Remove noModuleOp and bufferTagging flags In-Reply-To: References: Message-ID: <2CQM8KIJPGxvo2KSFjVQ7OBpeDFX6VJqqPoAy5xgpYw=.ab9bd535-4d84-4022-9570-0e415b7ea3f1@github.com> On Thu, 2 Oct 2025 23:06:07 GMT, Ruby Chen wrote: > Phase out the backend that doesn't use `ModuleOp`. Also make `bufferTagging` run by default. This pull request has now been integrated. Changeset: 09e34f28 Author: Ruby Chen Committer: Gary Frost URL: https://git.openjdk.org/babylon/commit/09e34f28441ed95fcc218a0c8b65e3d8e0c9190d Stats: 112 lines in 12 files changed: 15 ins; 77 del; 20 mod Remove noModuleOp and bufferTagging flags ------------- PR: https://git.openjdk.org/babylon/pull/599 From gfrost at openjdk.org Fri Oct 3 15:29:01 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 3 Oct 2025 15:29:01 GMT Subject: [code-reflection] Integrated: implemented preprocessor hook for OpenCL code gen Message-ID: Here we leverage OpenCL's ability to lean on the C99 preprocessor to generate C99 code. Instead of having OpenCL generator differentiate, we get the OpenCL code builder to define a set of #defines and generate backend 'neutral' C99 code (common between Cuda and OpenCL). This PR just has the OpenCL changes. Cuda changes will be next ------------- Commit messages: - implemented preprocessor hook for OpenCL code gen Changes: https://git.openjdk.org/babylon/pull/600/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=600&range=00 Stats: 250 lines in 10 files changed: 90 ins; 44 del; 116 mod Patch: https://git.openjdk.org/babylon/pull/600.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/600/head:pull/600 PR: https://git.openjdk.org/babylon/pull/600 From gfrost at openjdk.org Fri Oct 3 15:29:02 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 3 Oct 2025 15:29:02 GMT Subject: [code-reflection] Integrated: implemented preprocessor hook for OpenCL code gen In-Reply-To: References: Message-ID: On Fri, 3 Oct 2025 15:22:05 GMT, Gary Frost wrote: > Here we leverage OpenCL's ability to lean on the C99 preprocessor to generate C99 code. > > Instead of having OpenCL generator differentiate, we get the OpenCL code builder to define a set of #defines and generate backend 'neutral' C99 code (common between Cuda and OpenCL). > > This PR just has the OpenCL changes. Cuda changes will be next This pull request has now been integrated. Changeset: d1bd5d57 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/d1bd5d57d38573c536ec5c4d48b248c0e4b4a1cb Stats: 250 lines in 10 files changed: 90 ins; 44 del; 116 mod implemented preprocessor hook for OpenCL code gen ------------- PR: https://git.openjdk.org/babylon/pull/600 From gfrost at openjdk.org Fri Oct 3 15:29:11 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 3 Oct 2025 15:29:11 GMT Subject: git: openjdk/babylon: code-reflection: implemented preprocessor hook for OpenCL code gen Message-ID: <1fbd1449-f0dd-45a6-b596-74f9a95fcae1@openjdk.org> Changeset: d1bd5d57 Branch: code-reflection Author: Gary Frost Date: 2025-10-03 15:25:23 +0000 URL: https://git.openjdk.org/babylon/commit/d1bd5d57d38573c536ec5c4d48b248c0e4b4a1cb implemented preprocessor hook for OpenCL code gen ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLHatKernelBuilder.java ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/C99JExtractedBackend.java ! hat/core/src/main/java/hat/codebuilders/C99HATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/CodeBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilder.java ! hat/examples/experiments/src/main/java/experiments/PrefixSum.java ! hat/examples/nbody/src/main/java/nbody/opencl/OpenCLNBodyGLWindow.java From gfrost at openjdk.org Fri Oct 3 17:03:17 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 3 Oct 2025 17:03:17 GMT Subject: git: openjdk/babylon: code-reflection: cuda now also leverages c99 preprocessor Message-ID: Changeset: 86a9485a Branch: code-reflection Author: Gary Frost Date: 2025-10-03 17:01:32 +0000 URL: https://git.openjdk.org/babylon/commit/86a9485a0428af125533e7d2a01ef683d1598c28 cuda now also leverages c99 preprocessor ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/C99HATKernelBuilder.java + hat/hat/exp From gfrost at openjdk.org Fri Oct 3 17:04:53 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 3 Oct 2025 17:04:53 GMT Subject: [code-reflection] Integrated: cuda now also leverages c99 preprocessor Message-ID: Merged common HATKernelCodeGen. Now both CUDA and OpenCL lean on the c99 preprocessor. ------------- Commit messages: - cuda now also leverages c99 preprocessor Changes: https://git.openjdk.org/babylon/pull/601/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=601&range=00 Stats: 203 lines in 4 files changed: 75 ins; 99 del; 29 mod Patch: https://git.openjdk.org/babylon/pull/601.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/601/head:pull/601 PR: https://git.openjdk.org/babylon/pull/601 From gfrost at openjdk.org Fri Oct 3 17:04:53 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 3 Oct 2025 17:04:53 GMT Subject: [code-reflection] Integrated: cuda now also leverages c99 preprocessor In-Reply-To: References: Message-ID: <5hTVIZvyBeQtjmGEopReTVIPdTH4_6VXY3FOumLLIwA=.50b271a9-ded4-4854-b250-d3f1f9651b6f@github.com> On Fri, 3 Oct 2025 16:56:58 GMT, Gary Frost wrote: > Merged common HATKernelCodeGen. Now both CUDA and OpenCL lean on the c99 preprocessor. This pull request has now been integrated. Changeset: 86a9485a Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/86a9485a0428af125533e7d2a01ef683d1598c28 Stats: 203 lines in 4 files changed: 75 ins; 99 del; 29 mod cuda now also leverages c99 preprocessor ------------- PR: https://git.openjdk.org/babylon/pull/601 From gfrost at openjdk.org Sat Oct 4 10:26:32 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sat, 4 Oct 2025 10:26:32 GMT Subject: git: openjdk/babylon: code-reflection: converging cuda/opencl code gen using preprocessor Message-ID: <6533cdf7-3d36-4601-af00-8ed7a4815d34@openjdk.org> Changeset: 09d27d9b Branch: code-reflection Author: Gary Frost Date: 2025-10-04 10:24:15 +0000 URL: https://git.openjdk.org/babylon/commit/09d27d9b887a7d573855924abd12b9a558e9e201 converging cuda/opencl code gen using preprocessor ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/C99HATKernelBuilder.java From gfrost at openjdk.org Sat Oct 4 10:27:46 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sat, 4 Oct 2025 10:27:46 GMT Subject: [code-reflection] Integrated: converging cuda/opencl code gen using preprocessor Message-ID: <0o51AeV6_u0xdq69mH2MDBNpzZDqbkSlze_xpVDgZbg=.05462cfe-7167-4a82-868e-a4eb66073261@github.com> Took opportunity to move more c99 code gen to preprocessor. ------------- Commit messages: - converging cuda/opencl code gen using preprocessor Changes: https://git.openjdk.org/babylon/pull/602/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=602&range=00 Stats: 79 lines in 3 files changed: 20 ins; 25 del; 34 mod Patch: https://git.openjdk.org/babylon/pull/602.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/602/head:pull/602 PR: https://git.openjdk.org/babylon/pull/602 From gfrost at openjdk.org Sat Oct 4 10:27:46 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sat, 4 Oct 2025 10:27:46 GMT Subject: [code-reflection] Integrated: converging cuda/opencl code gen using preprocessor In-Reply-To: <0o51AeV6_u0xdq69mH2MDBNpzZDqbkSlze_xpVDgZbg=.05462cfe-7167-4a82-868e-a4eb66073261@github.com> References: <0o51AeV6_u0xdq69mH2MDBNpzZDqbkSlze_xpVDgZbg=.05462cfe-7167-4a82-868e-a4eb66073261@github.com> Message-ID: On Sat, 4 Oct 2025 10:22:02 GMT, Gary Frost wrote: > Took opportunity to move more c99 code gen to preprocessor. This pull request has now been integrated. Changeset: 09d27d9b Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/09d27d9b887a7d573855924abd12b9a558e9e201 Stats: 79 lines in 3 files changed: 20 ins; 25 del; 34 mod converging cuda/opencl code gen using preprocessor ------------- PR: https://git.openjdk.org/babylon/pull/602 From gfrost at openjdk.org Sat Oct 4 11:06:31 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sat, 4 Oct 2025 11:06:31 GMT Subject: [code-reflection] Integrated: CUDA and OpenCL C99 code now identical except for handling of atomics Message-ID: Generated code essentially same for CUDA and OpenCL. Not only does this lend itself to simpler codegen, it also opens the doorway to a HAT C99 dialect which we can use for prototyping and even intrinsics Check the code generated for HAT=SHOW_CODE java @hat/test ffi-opencl HAT=SHOW_CODE java @hat/test ffi-cuda ``` The only differences should be the generated preprocessor macros. We need to deal with atomics .... somehow. Still thinking about that. ------------- Commit messages: - CUDA and OpenCL C99 code now identical except for handling of atomics Changes: https://git.openjdk.org/babylon/pull/603/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=603&range=00 Stats: 90 lines in 3 files changed: 0 ins; 28 del; 62 mod Patch: https://git.openjdk.org/babylon/pull/603.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/603/head:pull/603 PR: https://git.openjdk.org/babylon/pull/603 From gfrost at openjdk.org Sat Oct 4 11:06:31 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sat, 4 Oct 2025 11:06:31 GMT Subject: [code-reflection] Integrated: CUDA and OpenCL C99 code now identical except for handling of atomics In-Reply-To: References: Message-ID: On Sat, 4 Oct 2025 11:00:19 GMT, Gary Frost wrote: > Generated code essentially same for CUDA and OpenCL. > > Not only does this lend itself to simpler codegen, it also opens the doorway to a HAT C99 dialect which we can use for prototyping and even intrinsics > > Check the code generated for > > HAT=SHOW_CODE java @hat/test ffi-opencl > HAT=SHOW_CODE java @hat/test ffi-cuda > ``` > The only differences should be the generated preprocessor macros. > > We need to deal with atomics .... somehow. Still thinking about that. This pull request has now been integrated. Changeset: b46f103b Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/b46f103b7cafa6216ee82fbc2c557a10883b1728 Stats: 90 lines in 3 files changed: 0 ins; 28 del; 62 mod CUDA and OpenCL C99 code now identical except for handling of atomics ------------- PR: https://git.openjdk.org/babylon/pull/603 From gfrost at openjdk.org Sat Oct 4 11:06:48 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sat, 4 Oct 2025 11:06:48 GMT Subject: git: openjdk/babylon: code-reflection: CUDA and OpenCL C99 code now identical except for handling of atomics Message-ID: Changeset: b46f103b Branch: code-reflection Author: Gary Frost Date: 2025-10-04 11:03:49 +0000 URL: https://git.openjdk.org/babylon/commit/b46f103b7cafa6216ee82fbc2c557a10883b1728 CUDA and OpenCL C99 code now identical except for handling of atomics ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/C99HATKernelBuilder.java From jfumero at openjdk.org Mon Oct 6 10:43:51 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 6 Oct 2025 10:43:51 GMT Subject: [code-reflection] Integrated: [hat][docs] Some useful links added Message-ID: Some useful links added ------------- Commit messages: - [hat][docs] Some useful links added Changes: https://git.openjdk.org/babylon/pull/604/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=604&range=00 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/604.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/604/head:pull/604 PR: https://git.openjdk.org/babylon/pull/604 From jfumero at openjdk.org Mon Oct 6 10:43:52 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 6 Oct 2025 10:43:52 GMT Subject: [code-reflection] Integrated: [hat][docs] Some useful links added In-Reply-To: References: Message-ID: On Mon, 6 Oct 2025 10:35:29 GMT, Juan Fumero wrote: > Some useful links added This pull request has now been integrated. Changeset: cd9577b0 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/cd9577b0fb12a17a3a672e58225a89c0bb8f23b9 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod [hat][docs] Some useful links added ------------- PR: https://git.openjdk.org/babylon/pull/604 From jfumero at openjdk.org Mon Oct 6 10:44:40 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 6 Oct 2025 10:44:40 GMT Subject: git: openjdk/babylon: code-reflection: [hat][docs] Some useful links added Message-ID: <5e4a160a-aecb-4420-94e7-3ef6f7137e08@openjdk.org> Changeset: cd9577b0 Branch: code-reflection Author: Juan Fumero Date: 2025-10-06 10:40:50 +0000 URL: https://git.openjdk.org/babylon/commit/cd9577b0fb12a17a3a672e58225a89c0bb8f23b9 [hat][docs] Some useful links added ! hat/docs/hat-notes-and-links.md From duke at openjdk.org Tue Oct 7 21:53:17 2025 From: duke at openjdk.org (Ruby Chen) Date: Tue, 7 Oct 2025 21:53:17 GMT Subject: [code-reflection] RFR: Add kernel entrypoint to ModuleOp Message-ID: Include the kernel (and compute) entrypoints in their respective ModuleOps. ------------- Commit messages: - Add kernel entrypoint to ModuleOp Changes: https://git.openjdk.org/babylon/pull/605/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=605&range=00 Stats: 43 lines in 2 files changed: 9 ins; 22 del; 12 mod Patch: https://git.openjdk.org/babylon/pull/605.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/605/head:pull/605 PR: https://git.openjdk.org/babylon/pull/605 From duke at openjdk.org Fri Oct 10 18:19:12 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 10 Oct 2025 18:19:12 GMT Subject: [code-reflection] RFR: Add private and local arrayView support Message-ID: <-E-v636NObf8LpGdZj4eYCphUYCSvkh7rgeShc4ORSA=.584358e1-13c4-4d7b-8de8-8876c7e32e34@github.com> Private and local arrayViews can now also be accessed using `.privateArrayView()` and `.localArrayView()`, respectively. Implementation of `.privateArrayView()` and `.localArrayView()` is left to the user, and accessing global arrays is still kept as `.arrayView()`. ------------- Commit messages: - add private and local arrayview support Changes: https://git.openjdk.org/babylon/pull/607/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=607&range=00 Stats: 188 lines in 4 files changed: 123 ins; 25 del; 40 mod Patch: https://git.openjdk.org/babylon/pull/607.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/607/head:pull/607 PR: https://git.openjdk.org/babylon/pull/607 From duke at openjdk.org Tue Oct 14 01:10:18 2025 From: duke at openjdk.org (Ruby Chen) Date: Tue, 14 Oct 2025 01:10:18 GMT Subject: [code-reflection] RFR: Add private and local arrayView support [v2] In-Reply-To: <-E-v636NObf8LpGdZj4eYCphUYCSvkh7rgeShc4ORSA=.584358e1-13c4-4d7b-8de8-8876c7e32e34@github.com> References: <-E-v636NObf8LpGdZj4eYCphUYCSvkh7rgeShc4ORSA=.584358e1-13c4-4d7b-8de8-8876c7e32e34@github.com> Message-ID: > Private and local arrayViews can now also be accessed using `.privateArrayView()` and `.localArrayView()`, respectively. > > Implementation of `.privateArrayView()` and `.localArrayView()` is left to the user, and accessing global arrays is still kept as `.arrayView()`. Ruby Chen has updated the pull request incrementally with one additional commit since the last revision: cleaning up arrayView code ------------- Changes: - all: https://git.openjdk.org/babylon/pull/607/files - new: https://git.openjdk.org/babylon/pull/607/files/9f8c9ec8..1411d7ed Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=607&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=607&range=00-01 Stats: 28 lines in 1 file changed: 0 ins; 10 del; 18 mod Patch: https://git.openjdk.org/babylon/pull/607.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/607/head:pull/607 PR: https://git.openjdk.org/babylon/pull/607 From duke at openjdk.org Tue Oct 14 01:10:19 2025 From: duke at openjdk.org (duke) Date: Tue, 14 Oct 2025 01:10:19 GMT Subject: [code-reflection] RFR: Add private and local arrayView support In-Reply-To: <-E-v636NObf8LpGdZj4eYCphUYCSvkh7rgeShc4ORSA=.584358e1-13c4-4d7b-8de8-8876c7e32e34@github.com> References: <-E-v636NObf8LpGdZj4eYCphUYCSvkh7rgeShc4ORSA=.584358e1-13c4-4d7b-8de8-8876c7e32e34@github.com> Message-ID: On Fri, 10 Oct 2025 18:13:23 GMT, Ruby Chen wrote: > Private and local arrayViews can now also be accessed using `.privateArrayView()` and `.localArrayView()`, respectively. > > Implementation of `.privateArrayView()` and `.localArrayView()` is left to the user, and accessing global arrays is still kept as `.arrayView()`. @rbrchen Your change (at version 1411d7ed716943c84d56d965649d35381b360005) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/babylon/pull/607#issuecomment-3399586999 From gfrost at openjdk.org Tue Oct 14 07:46:35 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 14 Oct 2025 07:46:35 GMT Subject: git: openjdk/babylon: code-reflection: Add private and local arrayView support Message-ID: <8b4b92f9-5093-4397-9051-5b223cbe703e@openjdk.org> Changeset: e5dfd23b Branch: code-reflection Author: Ruby Chen Committer: Gary Frost Date: 2025-10-14 07:45:38 +0000 URL: https://git.openjdk.org/babylon/commit/e5dfd23bac5e313870ca3dabcc02321d74ab59e5 Add private and local arrayView support ! hat/core/src/main/java/hat/callgraph/KernelCallGraph.java ! hat/core/src/main/java/hat/optools/OpTk.java ! hat/examples/arrayview/src/main/java/arrayview/Main.java ! hat/tests/src/main/java/oracle/code/hat/TestArrayView.java From duke at openjdk.org Tue Oct 14 07:48:39 2025 From: duke at openjdk.org (Ruby Chen) Date: Tue, 14 Oct 2025 07:48:39 GMT Subject: [code-reflection] Integrated: Add private and local arrayView support In-Reply-To: <-E-v636NObf8LpGdZj4eYCphUYCSvkh7rgeShc4ORSA=.584358e1-13c4-4d7b-8de8-8876c7e32e34@github.com> References: <-E-v636NObf8LpGdZj4eYCphUYCSvkh7rgeShc4ORSA=.584358e1-13c4-4d7b-8de8-8876c7e32e34@github.com> Message-ID: On Fri, 10 Oct 2025 18:13:23 GMT, Ruby Chen wrote: > Private and local arrayViews can now also be accessed using `.privateArrayView()` and `.localArrayView()`, respectively. > > Implementation of `.privateArrayView()` and `.localArrayView()` is left to the user, and accessing global arrays is still kept as `.arrayView()`. This pull request has now been integrated. Changeset: e5dfd23b Author: Ruby Chen Committer: Gary Frost URL: https://git.openjdk.org/babylon/commit/e5dfd23bac5e313870ca3dabcc02321d74ab59e5 Stats: 199 lines in 4 files changed: 120 ins; 32 del; 47 mod Add private and local arrayView support ------------- PR: https://git.openjdk.org/babylon/pull/607 From jfumero at openjdk.org Tue Oct 14 09:41:14 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 14 Oct 2025 09:41:14 GMT Subject: [code-reflection] RFR: Proposal for Vector Types for GPUs (OpenCL and CUDA backends) Message-ID: This PR opens a new proposal to integrate an API for representing explicit vector types in HAT. The way to operate is as follows: Float4 vA = a.float4View(index * 4); Float4 vB = b.float4View(index * 4); Float4 vC = Float4.add(vA, vB); c.storeFloat4View(vC, index * 4); Java programmers can load/store float4 chunks within one instruction by using array views. These views operate on GPU's global memory, but we can add similar concepts for local/shared and private memory. Additionally, Java/HAT developers can access lanes within the vector instance by name: vA.x(myNewValue); float foo = vA.z(); ``` We will iterate over this proposal. How to test? For CUDA HAT=SHOW_CODE,INFO,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda oracle.code.hat.TestVectorTypes For OpenCL: HAT=SHOW_CODE,INFO,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl oracle.code.hat.TestVectorTypes This PR also introduces a new option to debug the HAT Dialect Phases. HAT=SHOW_COMPILATION_PHASES ... ------------- Commit messages: - [hat] clean-up old code - [hat] float4 support for the CUDA backend types generalized - [hat] Padding for copyFrom/copyTo functions - Merge branch 'code-reflection' into hat/vector/types - [hat] Example of matmul with 2D RT + vector loads - [hat] Matmul with 2D register tiling + vector loads/stores working - [hat] clean-up test - [hat] CUDA backend with the right accessor for loading/storing float4 views - [hat] Allow float4 to/from local/private memory - [hat] Offsets for S32Arrays fixed - ... and 14 more: https://git.openjdk.org/babylon/compare/e5dfd23b...5f37c6f7 Changes: https://git.openjdk.org/babylon/pull/606/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=606&range=00 Stats: 3350 lines in 44 files changed: 3219 ins; 86 del; 45 mod Patch: https://git.openjdk.org/babylon/pull/606.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/606/head:pull/606 PR: https://git.openjdk.org/babylon/pull/606 From jfumero at openjdk.org Tue Oct 14 11:26:25 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 14 Oct 2025 11:26:25 GMT Subject: [code-reflection] RFR: Proposal for Vector Types for GPUs (OpenCL and CUDA backends) [v2] In-Reply-To: References: Message-ID: > This PR opens a new proposal to integrate an API for representing explicit vector types in HAT. > > The way to operate is as follows: > > > Float4 vA = a.float4View(index * 4); > Float4 vB = b.float4View(index * 4); > Float4 vC = Float4.add(vA, vB); > c.storeFloat4View(vC, index * 4); > > > Java programmers can load/store float4 chunks within one instruction by using array views. These views operate on GPU's global memory, but we can add similar concepts for local/shared and private memory. > > Additionally, Java/HAT developers can access lanes within the vector instance by name: > > > vA.x(myNewValue); > float foo = vA.z(); > ``` > > We will iterate over this proposal. > > How to test? > > For CUDA > > HAT=SHOW_CODE,INFO,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda oracle.code.hat.TestVectorTypes > > > For OpenCL: > > > > HAT=SHOW_CODE,INFO,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl oracle.code.hat.TestVectorTypes > > > This PR also introduces a new option to debug the HAT Dialect Phases. > > > HAT=SHOW_COMPILATION_PHASES ... Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] F32ArrayPadded DS added ------------- Changes: - all: https://git.openjdk.org/babylon/pull/606/files - new: https://git.openjdk.org/babylon/pull/606/files/5f37c6f7..7fbc18a7 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=606&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=606&range=00-01 Stats: 232 lines in 6 files changed: 137 ins; 14 del; 81 mod Patch: https://git.openjdk.org/babylon/pull/606.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/606/head:pull/606 PR: https://git.openjdk.org/babylon/pull/606 From jfumero at openjdk.org Tue Oct 14 12:12:17 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 14 Oct 2025 12:12:17 GMT Subject: git: openjdk/babylon: code-reflection: Proposal for Vector Types for GPUs (OpenCL and CUDA backends) Message-ID: Changeset: 26afd5b8 Branch: code-reflection Author: Juan Fumero Date: 2025-10-14 12:09:46 +0000 URL: https://git.openjdk.org/babylon/commit/26afd5b8e08e01fa126f88467ebdbb3d79f27a51 Proposal for Vector Types for GPUs (OpenCL and CUDA backends) ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/core/src/main/java/hat/Config.java ! hat/core/src/main/java/hat/buffer/F32Array.java ! hat/core/src/main/java/hat/buffer/F32Array2D.java + hat/core/src/main/java/hat/buffer/F32ArrayPadded.java + hat/core/src/main/java/hat/buffer/Float4.java + hat/core/src/main/java/hat/buffer/HatVector.java ! hat/core/src/main/java/hat/buffer/S08x3RGBImage.java ! hat/core/src/main/java/hat/buffer/S32Array.java - hat/core/src/main/java/hat/buffer/S32LocalArray.java ! hat/core/src/main/java/hat/callgraph/KernelCallGraph.java ! hat/core/src/main/java/hat/codebuilders/BabylonOpBuilder.java ! hat/core/src/main/java/hat/codebuilders/C99HATComputeBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilderWithContext.java ! hat/core/src/main/java/hat/codebuilders/ScopedCodeBuilderContext.java + hat/core/src/main/java/hat/dialect/HatVSelectLoadOp.java + hat/core/src/main/java/hat/dialect/HatVSelectStoreOp.java + hat/core/src/main/java/hat/dialect/HatVectorAddOp.java + hat/core/src/main/java/hat/dialect/HatVectorBinaryOp.java + hat/core/src/main/java/hat/dialect/HatVectorDivOp.java + hat/core/src/main/java/hat/dialect/HatVectorLoadOp.java + hat/core/src/main/java/hat/dialect/HatVectorMulOp.java + hat/core/src/main/java/hat/dialect/HatVectorStoreView.java + hat/core/src/main/java/hat/dialect/HatVectorSubOp.java + hat/core/src/main/java/hat/dialect/HatVectorVarLoadOp.java + hat/core/src/main/java/hat/dialect/HatVectorVarOp.java + hat/core/src/main/java/hat/dialect/HatVectorViewOp.java ! hat/core/src/main/java/hat/optools/OpTk.java + hat/core/src/main/java/hat/phases/HatCompilationTier.java + hat/core/src/main/java/hat/phases/HatDialectAbstractPhase.java ! hat/core/src/main/java/hat/phases/HatDialectifyBarrierPhase.java ! hat/core/src/main/java/hat/phases/HatDialectifyMemoryPhase.java ! hat/core/src/main/java/hat/phases/HatDialectifyThreadsPhase.java ! hat/core/src/main/java/hat/phases/HatDialectifyTier.java + hat/core/src/main/java/hat/phases/HatDialectifyVSelectPhase.java + hat/core/src/main/java/hat/phases/HatDialectifyVectorOpPhase.java + hat/core/src/main/java/hat/phases/HatDialectifyVectorStorePhase.java ! hat/examples/matmul/src/main/java/matmul/Main.java ! hat/hat/test.java ! hat/tests/src/main/java/oracle/code/hat/TestArrays.java ! hat/tests/src/main/java/oracle/code/hat/TestMatMul.java + hat/tests/src/main/java/oracle/code/hat/TestVectorTypes.java ! hat/tools/src/main/java/hat/tools/text/JavaHATCodeBuilder.java From jfumero at openjdk.org Tue Oct 14 12:12:49 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 14 Oct 2025 12:12:49 GMT Subject: [code-reflection] Integrated: Proposal for Vector Types for GPUs (OpenCL and CUDA backends) In-Reply-To: References: Message-ID: On Thu, 9 Oct 2025 14:34:08 GMT, Juan Fumero wrote: > This PR opens a new proposal to integrate an API for representing explicit vector types in HAT. > > The way to operate is as follows: > > > Float4 vA = a.float4View(index * 4); > Float4 vB = b.float4View(index * 4); > Float4 vC = Float4.add(vA, vB); > c.storeFloat4View(vC, index * 4); > > > Java programmers can load/store float4 chunks within one instruction by using array views. These views operate on GPU's global memory, but we can add similar concepts for local/shared and private memory. > > Additionally, Java/HAT developers can access lanes within the vector instance by name: > > > vA.x(myNewValue); > float foo = vA.z(); > ``` > > This PR also extends the HAT API to allow vector functions in a chain. For example: > > > va.add(vb).mul(vc).div(va.mul(va)); > > > We will iterate over this proposal. > > How to test? > > For CUDA > > HAT=SHOW_CODE,INFO,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda oracle.code.hat.TestVectorTypes > > > For OpenCL: > > > HAT=SHOW_CODE,INFO,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl oracle.code.hat.TestVectorTypes > > > This PR also introduces a new option to debug the HAT Dialect Phases. > > > HAT=SHOW_COMPILATION_PHASES ... This pull request has now been integrated. Changeset: 26afd5b8 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/26afd5b8e08e01fa126f88467ebdbb3d79f27a51 Stats: 3489 lines in 45 files changed: 3344 ins; 88 del; 57 mod Proposal for Vector Types for GPUs (OpenCL and CUDA backends) ------------- PR: https://git.openjdk.org/babylon/pull/606 From duke at openjdk.org Tue Oct 14 16:38:40 2025 From: duke at openjdk.org (Ruby Chen) Date: Tue, 14 Oct 2025 16:38:40 GMT Subject: [code-reflection] RFR: Add kernel entrypoint to ModuleOp [v2] In-Reply-To: References: Message-ID: > Include the kernel (and compute) entrypoints in their respective ModuleOps. Ruby Chen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge branch 'code-reflection' into cleanup - Add kernel entrypoint to ModuleOp ------------- Changes: https://git.openjdk.org/babylon/pull/605/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=605&range=01 Stats: 45 lines in 2 files changed: 11 ins; 22 del; 12 mod Patch: https://git.openjdk.org/babylon/pull/605.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/605/head:pull/605 PR: https://git.openjdk.org/babylon/pull/605 From psandoz at openjdk.org Tue Oct 14 16:42:27 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Tue, 14 Oct 2025 16:42:27 GMT Subject: [babylon-docs:master] Integrated: Links to latest presentations Message-ID: Add links to JVMLS 2025 and Devoxx Belgium 2025 talks. ------------- Commit messages: - Links to latest presentations. Changes: https://git.openjdk.org/babylon-docs/pull/8/files Webrev: https://webrevs.openjdk.org/?repo=babylon-docs&pr=8&range=00 Stats: 7 lines in 1 file changed: 7 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon-docs/pull/8.diff Fetch: git fetch https://git.openjdk.org/babylon-docs.git pull/8/head:pull/8 PR: https://git.openjdk.org/babylon-docs/pull/8 From psandoz at openjdk.org Tue Oct 14 16:42:28 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Tue, 14 Oct 2025 16:42:28 GMT Subject: [babylon-docs:master] Integrated: Links to latest presentations In-Reply-To: References: Message-ID: On Tue, 14 Oct 2025 16:34:31 GMT, Paul Sandoz wrote: > Add links to JVMLS 2025 and Devoxx Belgium 2025 talks. This pull request has now been integrated. Changeset: bb5f9e25 Author: Paul Sandoz URL: https://git.openjdk.org/babylon-docs/commit/bb5f9e2562cf85fc7e33e22c587bbdd6fc020e40 Stats: 7 lines in 1 file changed: 7 ins; 0 del; 0 mod Links to latest presentations ------------- PR: https://git.openjdk.org/babylon-docs/pull/8 From duke at openjdk.org Tue Oct 14 16:52:50 2025 From: duke at openjdk.org (duke) Date: Tue, 14 Oct 2025 16:52:50 GMT Subject: [code-reflection] RFR: Add kernel entrypoint to ModuleOp [v2] In-Reply-To: References: Message-ID: On Tue, 14 Oct 2025 16:38:40 GMT, Ruby Chen wrote: >> Include the kernel (and compute) entrypoints in their respective ModuleOps. > > Ruby Chen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Merge branch 'code-reflection' into cleanup > - Add kernel entrypoint to ModuleOp @rbrchen Your change (at version 408391ce04fe44752f7acb6df30140a68178fd78) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/babylon/pull/605#issuecomment-3402793105 From psandoz at openjdk.org Tue Oct 14 16:58:35 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Tue, 14 Oct 2025 16:58:35 GMT Subject: [babylon-docs:master] Integrated: Add link to J1 preso Message-ID: Add link to Gary's J1 preso. ------------- Commit messages: - Add J1 preso Changes: https://git.openjdk.org/babylon-docs/pull/9/files Webrev: https://webrevs.openjdk.org/?repo=babylon-docs&pr=9&range=00 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon-docs/pull/9.diff Fetch: git fetch https://git.openjdk.org/babylon-docs.git pull/9/head:pull/9 PR: https://git.openjdk.org/babylon-docs/pull/9 From psandoz at openjdk.org Tue Oct 14 16:58:35 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Tue, 14 Oct 2025 16:58:35 GMT Subject: [babylon-docs:master] Integrated: Add link to J1 preso In-Reply-To: References: Message-ID: On Tue, 14 Oct 2025 16:48:22 GMT, Paul Sandoz wrote: > Add link to Gary's J1 preso. This pull request has now been integrated. Changeset: 26829e89 Author: Paul Sandoz URL: https://git.openjdk.org/babylon-docs/commit/26829e89513b8522957aa60775a749a77b930293 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Add link to J1 preso ------------- PR: https://git.openjdk.org/babylon-docs/pull/9 From gfrost at openjdk.org Wed Oct 15 12:15:46 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 15 Oct 2025 12:15:46 GMT Subject: git: openjdk/babylon: code-reflection: Decouple example-experiments from opencl + add example_arrayview to intellij Message-ID: Changeset: cdb0f4a9 Branch: code-reflection Author: Gary Frost Date: 2025-10-15 12:13:18 +0000 URL: https://git.openjdk.org/babylon/commit/cdb0f4a9d1cccb68c36df0dfcfffa9ef22f39cb9 Decouple example-experiments from opencl + add example_arrayview to intellij ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLHatKernelBuilder.java + hat/docs/duke-hat.svg ! hat/examples/experiments/src/main/java/experiments/Mesh.java ! hat/examples/experiments/src/main/java/experiments/MinBufferTest.java ! hat/hat.java ! hat/intellij/.idea/modules.xml + hat/intellij/example_arrayview.iml ! hat/intellij/example_experiments.iml From gfrost at openjdk.org Wed Oct 15 12:16:47 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 15 Oct 2025 12:16:47 GMT Subject: [code-reflection] Integrated: Decouple example-experiments from opencl + add example_arrayview to intellij Message-ID: Some housekeeping. We should never have example-experiments which depend on a specific backend. We had two Mesh.java and MinBufferTest.java Otherwide `@hat/exp yada experiment` will always pick up the specific backend and will ignor ethe one provided. I also fixed the HatOpenCLKernelBuilder in jextracted opendl. I think this needs removing, but at least it compiles now. ------------- Commit messages: - Decouple example-experiments from opencl backend + add example_arrayview to intellij proj Changes: https://git.openjdk.org/babylon/pull/608/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=608&range=00 Stats: 256 lines in 8 files changed: 233 ins; 18 del; 5 mod Patch: https://git.openjdk.org/babylon/pull/608.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/608/head:pull/608 PR: https://git.openjdk.org/babylon/pull/608 From gfrost at openjdk.org Wed Oct 15 12:16:49 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 15 Oct 2025 12:16:49 GMT Subject: [code-reflection] Integrated: Decouple example-experiments from opencl + add example_arrayview to intellij In-Reply-To: References: Message-ID: On Wed, 15 Oct 2025 12:08:16 GMT, Gary Frost wrote: > Some housekeeping. > > We should never have example-experiments which depend on a specific backend. We had two Mesh.java and MinBufferTest.java > > Otherwide `@hat/exp yada experiment` will always pick up the specific backend and will ignor ethe one provided. > > I also fixed the HatOpenCLKernelBuilder in jextracted opendl. I think this needs removing, but at least it compiles now. This pull request has now been integrated. Changeset: cdb0f4a9 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/cdb0f4a9d1cccb68c36df0dfcfffa9ef22f39cb9 Stats: 256 lines in 8 files changed: 233 ins; 18 del; 5 mod Decouple example-experiments from opencl + add example_arrayview to intellij ------------- PR: https://git.openjdk.org/babylon/pull/608 From gfrost at openjdk.org Wed Oct 15 12:43:41 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 15 Oct 2025 12:43:41 GMT Subject: [code-reflection] Integrated: Updated Config Message-ID: Added some config bits in prep for Backend changes. ------------- Commit messages: - Updated Config Changes: https://git.openjdk.org/babylon/pull/609/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=609&range=00 Stats: 35 lines in 2 files changed: 10 ins; 15 del; 10 mod Patch: https://git.openjdk.org/babylon/pull/609.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/609/head:pull/609 PR: https://git.openjdk.org/babylon/pull/609 From gfrost at openjdk.org Wed Oct 15 12:43:42 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 15 Oct 2025 12:43:42 GMT Subject: [code-reflection] Integrated: Updated Config In-Reply-To: References: Message-ID: On Wed, 15 Oct 2025 12:36:22 GMT, Gary Frost wrote: > Added some config bits in prep for Backend changes. This pull request has now been integrated. Changeset: 31ee3dc4 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/31ee3dc417fabdcc9581598b0fe7cd70391732d9 Stats: 35 lines in 2 files changed: 10 ins; 15 del; 10 mod Updated Config ------------- PR: https://git.openjdk.org/babylon/pull/609 From gfrost at openjdk.org Wed Oct 15 12:44:28 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 15 Oct 2025 12:44:28 GMT Subject: git: openjdk/babylon: code-reflection: Updated Config Message-ID: <70cee9bf-06c8-48ab-b4d0-5ed3eba2f5ee@openjdk.org> Changeset: 31ee3dc4 Branch: code-reflection Author: Gary Frost Date: 2025-10-15 12:40:07 +0000 URL: https://git.openjdk.org/babylon/commit/31ee3dc417fabdcc9581598b0fe7cd70391732d9 Updated Config ! hat/backends/ffi/shared/src/main/native/include/config.h ! hat/core/src/main/java/hat/Config.java From duke at openjdk.org Wed Oct 15 18:56:56 2025 From: duke at openjdk.org (Ruby Chen) Date: Wed, 15 Oct 2025 18:56:56 GMT Subject: [code-reflection] RFR: Update buffer tagging with arrayview support Message-ID: Add buffer tagging for array views, and also use `elements()` instead of `traverse()`. ------------- Commit messages: - Update buffer tagging with arrayview support Changes: https://git.openjdk.org/babylon/pull/610/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=610&range=00 Stats: 39 lines in 2 files changed: 17 ins; 3 del; 19 mod Patch: https://git.openjdk.org/babylon/pull/610.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/610/head:pull/610 PR: https://git.openjdk.org/babylon/pull/610 From duke at openjdk.org Wed Oct 15 19:01:50 2025 From: duke at openjdk.org (duke) Date: Wed, 15 Oct 2025 19:01:50 GMT Subject: [code-reflection] RFR: Update buffer tagging with arrayview support In-Reply-To: References: Message-ID: On Wed, 15 Oct 2025 18:50:16 GMT, Ruby Chen wrote: > Add buffer tagging for array views, and also use `elements()` instead of `traverse()`. @rbrchen Your change (at version 0da1fe6ddea18a405bc365ca095766178b33d718) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/babylon/pull/610#issuecomment-3407838458 From jfumero at openjdk.org Thu Oct 16 08:26:48 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 16 Oct 2025 08:26:48 GMT Subject: [code-reflection] RFR: [hat] KernelContext from the hat.buffer package renamed to KernelBufferContext Message-ID: `KernelContext` from the hat.buffer package renamed to `KernelBufferContext`. ------------- Commit messages: - [hat] KernelContext from the hat.buffer package renamed to KernelBufferContext Changes: https://git.openjdk.org/babylon/pull/611/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=611&range=00 Stats: 314 lines in 4 files changed: 146 ins; 147 del; 21 mod Patch: https://git.openjdk.org/babylon/pull/611.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/611/head:pull/611 PR: https://git.openjdk.org/babylon/pull/611 From jfumero at openjdk.org Thu Oct 16 08:34:50 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 16 Oct 2025 08:34:50 GMT Subject: [code-reflection] Integrated: [hat] KernelContext from the hat.buffer package renamed to KernelBufferContext In-Reply-To: References: Message-ID: On Thu, 16 Oct 2025 08:18:45 GMT, Juan Fumero wrote: > `KernelContext` from the hat.buffer package renamed to `KernelBufferContext`. This pull request has now been integrated. Changeset: eacbfd77 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/eacbfd7760416e06088012400a2565b88124ee90 Stats: 314 lines in 4 files changed: 146 ins; 147 del; 21 mod [hat] KernelContext from the hat.buffer package renamed to KernelBufferContext ------------- PR: https://git.openjdk.org/babylon/pull/611 From jfumero at openjdk.org Thu Oct 16 08:36:22 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 16 Oct 2025 08:36:22 GMT Subject: git: openjdk/babylon: code-reflection: [hat] KernelContext from the hat.buffer package renamed to KernelBufferContext Message-ID: <78628dbe-9574-44e1-8b2c-1a88e0b216d7@openjdk.org> Changeset: eacbfd77 Branch: code-reflection Author: Juan Fumero Date: 2025-10-16 08:31:45 +0000 URL: https://git.openjdk.org/babylon/commit/eacbfd7760416e06088012400a2565b88124ee90 [hat] KernelContext from the hat.buffer package renamed to KernelBufferContext ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java + hat/core/src/main/java/hat/buffer/KernelBufferContext.java - hat/core/src/main/java/hat/buffer/KernelContext.java ! hat/core/src/main/java/hat/optools/OpTk.java From gfrost at openjdk.org Thu Oct 16 13:06:23 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 13:06:23 GMT Subject: git: openjdk/babylon: code-reflection: Hat add kernel code annotation Message-ID: <8789e213-43f4-414a-bfc7-6dee728914ca@openjdk.org> Changeset: 0ce11a2c Branch: code-reflection Author: Gary Frost Date: 2025-10-16 13:05:19 +0000 URL: https://git.openjdk.org/babylon/commit/0ce11a2cc11c3c7a3541043bb5bb418cc8094080 Hat add kernel code annotation ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaBackend.java ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/PTXHATKernelBuilder.java ! hat/backends/ffi/mock/src/main/java/hat/backend/ffi/MockBackend.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackend.java ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLHatKernelBuilder.java ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/C99JExtractedBackend.java ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/JExtractedBackend.java ! hat/core/src/main/java/hat/BufferTagger.java ! hat/core/src/main/java/hat/ComputeContext.java ! hat/core/src/main/java/hat/backend/DebugBackend.java ! hat/core/src/main/java/hat/callgraph/CallGraph.java ! hat/core/src/main/java/hat/callgraph/ComputeCallGraph.java ! hat/core/src/main/java/hat/callgraph/KernelCallGraph.java ! hat/core/src/main/java/hat/codebuilders/BabylonOpBuilder.java ! hat/core/src/main/java/hat/codebuilders/C99HATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilderWithContext.java ! hat/core/src/main/java/hat/codebuilders/ScopedCodeBuilderContext.java = hat/core/src/main/java/hat/dialect/HATBarrierOp.java + hat/core/src/main/java/hat/dialect/HATBlockThreadIdOp.java + hat/core/src/main/java/hat/dialect/HATGlobalSizeOp.java + hat/core/src/main/java/hat/dialect/HATGlobalThreadIdOp.java + hat/core/src/main/java/hat/dialect/HATLocalSizeOp.java + hat/core/src/main/java/hat/dialect/HATLocalThreadIdOp.java + hat/core/src/main/java/hat/dialect/HATLocalVarOp.java = hat/core/src/main/java/hat/dialect/HATMemoryOp.java + hat/core/src/main/java/hat/dialect/HATOp.java = hat/core/src/main/java/hat/dialect/HATPrivateVarOp.java + hat/core/src/main/java/hat/dialect/HATThreadOp.java = hat/core/src/main/java/hat/dialect/HATVSelectLoadOp.java = hat/core/src/main/java/hat/dialect/HATVSelectStoreOp.java + hat/core/src/main/java/hat/dialect/HATVectorAddOp.java = hat/core/src/main/java/hat/dialect/HATVectorBinaryOp.java + hat/core/src/main/java/hat/dialect/HATVectorDivOp.java = hat/core/src/main/java/hat/dialect/HATVectorLoadOp.java + hat/core/src/main/java/hat/dialect/HATVectorMulOp.java = hat/core/src/main/java/hat/dialect/HATVectorStoreView.java + hat/core/src/main/java/hat/dialect/HATVectorSubOp.java + hat/core/src/main/java/hat/dialect/HATVectorVarLoadOp.java = hat/core/src/main/java/hat/dialect/HATVectorVarOp.java = hat/core/src/main/java/hat/dialect/HATVectorViewOp.java - hat/core/src/main/java/hat/dialect/HatBlockThreadIdOp.java - hat/core/src/main/java/hat/dialect/HatGlobalSizeOp.java - hat/core/src/main/java/hat/dialect/HatGlobalThreadIdOp.java - hat/core/src/main/java/hat/dialect/HatLocalSizeOp.java - hat/core/src/main/java/hat/dialect/HatLocalThreadIdOp.java - hat/core/src/main/java/hat/dialect/HatLocalVarOp.java - hat/core/src/main/java/hat/dialect/HatOP.java - hat/core/src/main/java/hat/dialect/HatThreadOP.java - hat/core/src/main/java/hat/dialect/HatVectorAddOp.java - hat/core/src/main/java/hat/dialect/HatVectorDivOp.java - hat/core/src/main/java/hat/dialect/HatVectorMulOp.java - hat/core/src/main/java/hat/dialect/HatVectorSubOp.java - hat/core/src/main/java/hat/dialect/HatVectorVarLoadOp.java ! hat/core/src/main/java/hat/optools/OpTk.java = hat/core/src/main/java/hat/phases/HATCompilationTier.java + hat/core/src/main/java/hat/phases/HATDialectAbstractPhase.java + hat/core/src/main/java/hat/phases/HATDialectifyBarrierPhase.java + hat/core/src/main/java/hat/phases/HATDialectifyMemoryPhase.java = hat/core/src/main/java/hat/phases/HATDialectifyPhase.java + hat/core/src/main/java/hat/phases/HATDialectifyThreadsPhase.java + hat/core/src/main/java/hat/phases/HATDialectifyTier.java + hat/core/src/main/java/hat/phases/HATDialectifyVSelectPhase.java + hat/core/src/main/java/hat/phases/HATDialectifyVectorOpPhase.java + hat/core/src/main/java/hat/phases/HATDialectifyVectorStorePhase.java = hat/core/src/main/java/hat/phases/HATFinalDetectionPhase.java = hat/core/src/main/java/hat/phases/HATPhase.java - hat/core/src/main/java/hat/phases/HatDialectAbstractPhase.java - hat/core/src/main/java/hat/phases/HatDialectifyBarrierPhase.java - hat/core/src/main/java/hat/phases/HatDialectifyMemoryPhase.java - hat/core/src/main/java/hat/phases/HatDialectifyThreadsPhase.java - hat/core/src/main/java/hat/phases/HatDialectifyTier.java - hat/core/src/main/java/hat/phases/HatDialectifyVSelectPhase.java - hat/core/src/main/java/hat/phases/HatDialectifyVectorOpPhase.java - hat/core/src/main/java/hat/phases/HatDialectifyVectorStorePhase.java ! hat/examples/experiments/src/main/java/experiments/DNA.java ! hat/examples/experiments/src/main/java/experiments/LayoutExample.java ! hat/examples/experiments/src/main/java/experiments/PrefixSum.java ! hat/examples/experiments/src/main/java/experiments/RawLayout.java ! hat/examples/experiments/src/main/java/experiments/Transform.java ! hat/tools/src/main/java/hat/tools/text/JavaHATCodeBuilder.java From gfrost at openjdk.org Thu Oct 16 13:08:41 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 13:08:41 GMT Subject: [code-reflection] Integrated: Hat add kernel code annotation Message-ID: Tracking side table issue. Not fixed yet, but homing in. I have moved all transforms (and traverses and stream access to ops) into central OpTK apis in preparation for having a single place for updating sidetables. I added a tracing mechanism for reporting accesses to transform, element stream access and traverses of funcops . This is useful for seeing where we are 'inadvertantly' transforming and possibly trashing sidetable. java @hat/run ffi-opencl -DTRACE_CALLSITES=true life This PR was getting too large and I was worried about future merges. So I am pushing now. This code still has the side table issue, but we have some tooling to help find it ------------- Commit messages: - Merge branch 'code-reflection' into hat-add-kernel-code-annotation - Tracking down issue with side tables - Add annotation and fixup OpTk Changes: https://git.openjdk.org/babylon/pull/612/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=612&range=00 Stats: 4946 lines in 84 files changed: 2327 ins; 2203 del; 416 mod Patch: https://git.openjdk.org/babylon/pull/612.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/612/head:pull/612 PR: https://git.openjdk.org/babylon/pull/612 From gfrost at openjdk.org Thu Oct 16 13:08:41 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 13:08:41 GMT Subject: [code-reflection] Integrated: Hat add kernel code annotation In-Reply-To: References: Message-ID: On Thu, 16 Oct 2025 12:58:45 GMT, Gary Frost wrote: > Tracking side table issue. > > Not fixed yet, but homing in. > > I have moved all transforms (and traverses and stream access to ops) into central OpTK apis in preparation for having a single place for updating sidetables. > > I added a tracing mechanism for reporting accesses to transform, element stream access and traverses of funcops . This is useful for seeing where we are 'inadvertantly' transforming and possibly trashing sidetable. > > > java @hat/run ffi-opencl -DTRACE_CALLSITES=true life > > > This PR was getting too large and I was worried about future merges. So I am pushing now. > This code still has the side table issue, but we have some tooling to help find it This pull request has now been integrated. Changeset: 0ce11a2c Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/0ce11a2cc11c3c7a3541043bb5bb418cc8094080 Stats: 4946 lines in 84 files changed: 2327 ins; 2203 del; 416 mod Hat add kernel code annotation ------------- PR: https://git.openjdk.org/babylon/pull/612 From gfrost at openjdk.org Thu Oct 16 13:18:57 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 13:18:57 GMT Subject: [code-reflection] Integrated: Fixed merge issues from last PR Message-ID: I messed up the previous merge.. This PR has fixes ------------- Commit messages: - Fixed merge issues from last PR Changes: https://git.openjdk.org/babylon/pull/613/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=613&range=00 Stats: 12 lines in 3 files changed: 2 ins; 5 del; 5 mod Patch: https://git.openjdk.org/babylon/pull/613.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/613/head:pull/613 PR: https://git.openjdk.org/babylon/pull/613 From gfrost at openjdk.org Thu Oct 16 13:19:03 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 13:19:03 GMT Subject: git: openjdk/babylon: code-reflection: Fixed merge issues from last PR Message-ID: <434fbdcc-5c2c-4026-83b0-c9f4f134db84@openjdk.org> Changeset: bc4faed7 Branch: code-reflection Author: Gary Frost Date: 2025-10-16 13:16:10 +0000 URL: https://git.openjdk.org/babylon/commit/bc4faed7aae7b56f68c5420098e4d26f69eaed07 Fixed merge issues from last PR ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/C99JExtractedBackend.java = hat/core/src/main/java/hat/annotations/Kernel.java ! hat/core/src/main/java/hat/optools/OpTk.java From gfrost at openjdk.org Thu Oct 16 13:18:57 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 13:18:57 GMT Subject: [code-reflection] Integrated: Fixed merge issues from last PR In-Reply-To: References: Message-ID: On Thu, 16 Oct 2025 13:12:38 GMT, Gary Frost wrote: > I messed up the previous merge.. > > This PR has fixes This pull request has now been integrated. Changeset: bc4faed7 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/bc4faed7aae7b56f68c5420098e4d26f69eaed07 Stats: 12 lines in 3 files changed: 2 ins; 5 del; 5 mod Fixed merge issues from last PR ------------- PR: https://git.openjdk.org/babylon/pull/613 From asotona at openjdk.org Thu Oct 16 13:43:10 2025 From: asotona at openjdk.org (Adam Sotona) Date: Thu, 16 Oct 2025 13:43:10 GMT Subject: [code-reflection] RFR: OnnxProtoBuilder fixes Message-ID: - fixes ONNX graph output name of returned tuple element - fixes String AttributeProto value ------------- Commit messages: - OnnxProtoBuilder fixes Changes: https://git.openjdk.org/babylon/pull/614/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=614&range=00 Stats: 7 lines in 1 file changed: 6 ins; 1 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/614.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/614/head:pull/614 PR: https://git.openjdk.org/babylon/pull/614 From gfrost at openjdk.org Thu Oct 16 14:44:47 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 14:44:47 GMT Subject: [code-reflection] Integrated: Moved dialect and arrayview transforms to KernelCallGraph constructor Message-ID: OK so this gets us performance back in HAT. I moved the dialect op mapping and array view mappings to KernelCallGraph creation (from first dispatch) Mandle now back to 180 GPS. ------------- Commit messages: - Moved dialect and arrayview transforms to KernelCallGraph constructor Changes: https://git.openjdk.org/babylon/pull/615/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=615&range=00 Stats: 80 lines in 4 files changed: 22 ins; 44 del; 14 mod Patch: https://git.openjdk.org/babylon/pull/615.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/615/head:pull/615 PR: https://git.openjdk.org/babylon/pull/615 From gfrost at openjdk.org Thu Oct 16 14:44:47 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 14:44:47 GMT Subject: [code-reflection] Integrated: Moved dialect and arrayview transforms to KernelCallGraph constructor In-Reply-To: References: Message-ID: On Thu, 16 Oct 2025 14:38:03 GMT, Gary Frost wrote: > OK so this gets us performance back in HAT. > > I moved the dialect op mapping and array view mappings to KernelCallGraph creation (from first dispatch) > > Mandle now back to 180 GPS. This pull request has now been integrated. Changeset: fc5c4720 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/fc5c47206b7ae71bf203564e8ad1e79e50adbb21 Stats: 80 lines in 4 files changed: 22 ins; 44 del; 14 mod Moved dialect and arrayview transforms to KernelCallGraph constructor ------------- PR: https://git.openjdk.org/babylon/pull/615 From gfrost at openjdk.org Thu Oct 16 14:42:48 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 16 Oct 2025 14:42:48 GMT Subject: git: openjdk/babylon: code-reflection: Moved dialect and arrayview transforms to KernelCallGraph constructor Message-ID: Changeset: fc5c4720 Branch: code-reflection Author: Gary Frost Date: 2025-10-16 14:41:17 +0000 URL: https://git.openjdk.org/babylon/commit/fc5c47206b7ae71bf203564e8ad1e79e50adbb21 Moved dialect and arrayview transforms to KernelCallGraph constructor ! hat/core/src/main/java/hat/ComputeContext.java ! hat/core/src/main/java/hat/callgraph/CallGraph.java ! hat/core/src/main/java/hat/callgraph/ComputeCallGraph.java ! hat/core/src/main/java/hat/callgraph/KernelCallGraph.java From jfumero at openjdk.org Fri Oct 17 09:12:59 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 17 Oct 2025 09:12:59 GMT Subject: git: openjdk/babylon: code-reflection: [hat] Testing framework moved to hat.test Message-ID: <34e51898-3df4-4559-8ae5-c331349b89b9@openjdk.org> Changeset: 9570005d Branch: code-reflection Author: Juan Fumero Date: 2025-10-17 09:12:26 +0000 URL: https://git.openjdk.org/babylon/commit/9570005d172674cfd0f5d07509903479d734dd07 [hat] Testing framework moved to hat.test ! hat/hat.java ! hat/hat/test.java = hat/tests/src/main/java/hat/test/TestArrayView.java = hat/tests/src/main/java/hat/test/TestArrays.java = hat/tests/src/main/java/hat/test/TestBlackscholes.java = hat/tests/src/main/java/hat/test/TestConstants.java = hat/tests/src/main/java/hat/test/TestLocal.java = hat/tests/src/main/java/hat/test/TestMandel.java = hat/tests/src/main/java/hat/test/TestMatMul.java = hat/tests/src/main/java/hat/test/TestNbody.java = hat/tests/src/main/java/hat/test/TestParenthesis.java = hat/tests/src/main/java/hat/test/TestPrivate.java = hat/tests/src/main/java/hat/test/TestReductions.java = hat/tests/src/main/java/hat/test/TestVectorTypes.java = hat/tests/src/main/java/hat/test/annotation/HatTest.java = hat/tests/src/main/java/hat/test/engine/Colours.java = hat/tests/src/main/java/hat/test/engine/HatAssertionError.java = hat/tests/src/main/java/hat/test/engine/HatAsserts.java = hat/tests/src/main/java/hat/test/engine/HatTestEngine.java = hat/tests/src/main/java/hat/test/engine/HatTestFormatter.java From jfumero at openjdk.org Fri Oct 17 09:16:59 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 17 Oct 2025 09:16:59 GMT Subject: [code-reflection] Integrated: [hat] Testing framework moved to hat.test Message-ID: Refactor: testing framework moved from `oracle.code.hat` to `hat.test` ------------- Commit messages: - [hat] Testing framework moved to hat.test Changes: https://git.openjdk.org/babylon/pull/616/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=616&range=00 Stats: 60 lines in 20 files changed: 0 ins; 1 del; 59 mod Patch: https://git.openjdk.org/babylon/pull/616.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/616/head:pull/616 PR: https://git.openjdk.org/babylon/pull/616 From jfumero at openjdk.org Fri Oct 17 09:17:00 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 17 Oct 2025 09:17:00 GMT Subject: [code-reflection] Integrated: [hat] Testing framework moved to hat.test In-Reply-To: References: Message-ID: On Fri, 17 Oct 2025 09:07:06 GMT, Juan Fumero wrote: > Refactor: testing framework moved from `oracle.code.hat` to `hat.test` This pull request has now been integrated. Changeset: 9570005d Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/9570005d172674cfd0f5d07509903479d734dd07 Stats: 60 lines in 20 files changed: 0 ins; 1 del; 59 mod [hat] Testing framework moved to hat.test ------------- PR: https://git.openjdk.org/babylon/pull/616 From jfumero at openjdk.org Fri Oct 17 10:06:56 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 17 Oct 2025 10:06:56 GMT Subject: git: openjdk/babylon: code-reflection: [hat] Runner for a single test Message-ID: <9b787dd3-e0e7-4564-80e9-46944c13c45e@openjdk.org> Changeset: e02d79f2 Branch: code-reflection Author: Juan Fumero Date: 2025-10-17 10:02:41 +0000 URL: https://git.openjdk.org/babylon/commit/e02d79f2522c05117ceb7878c65023ef4bd43502 [hat] Runner for a single test ! hat/hat.java ! hat/scripts/remoteTesting.sh From jfumero at openjdk.org Fri Oct 17 10:07:57 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 17 Oct 2025 10:07:57 GMT Subject: [code-reflection] Integrated: [hat] Runner for a single test Message-ID: This patch extends the testing framework to execute single tests using the new hat launcher. Run the test suite: java -cp hat/job.jar hat.java test-suite ffi-opencl Run a single test class: java -cp hat/job.jar hat.java test ffi-opencl hat.test.TestMatMul Run a single test method: java -cp hat/job.jar hat.java test ffi-opencl hat.test.TestMatMul#testMatrixMultiply1D ------------- Commit messages: - [hat] Update remote testing with the test-suite - [hat] Runner for a single test Changes: https://git.openjdk.org/babylon/pull/617/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=617&range=00 Stats: 26 lines in 2 files changed: 24 ins; 0 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/617.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/617/head:pull/617 PR: https://git.openjdk.org/babylon/pull/617 From jfumero at openjdk.org Fri Oct 17 10:07:59 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 17 Oct 2025 10:07:59 GMT Subject: [code-reflection] Integrated: [hat] Runner for a single test In-Reply-To: References: Message-ID: On Fri, 17 Oct 2025 09:40:44 GMT, Juan Fumero wrote: > This patch extends the testing framework to execute single tests using the new hat launcher. > > Run the test suite: > > > java -cp hat/job.jar hat.java test-suite ffi-opencl > > > Run a single test class: > > > java -cp hat/job.jar hat.java test ffi-opencl hat.test.TestMatMul > > > Run a single test method: > > > java -cp hat/job.jar hat.java test ffi-opencl hat.test.TestMatMul#testMatrixMultiply1D This pull request has now been integrated. Changeset: e02d79f2 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/e02d79f2522c05117ceb7878c65023ef4bd43502 Stats: 26 lines in 2 files changed: 24 ins; 0 del; 2 mod [hat] Runner for a single test ------------- PR: https://git.openjdk.org/babylon/pull/617 From gfrost at openjdk.org Fri Oct 17 12:05:09 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 17 Oct 2025 12:05:09 GMT Subject: [code-reflection] Integrated: Added @hat/help and @hat/test-suite Message-ID: Added @hat/help (display help) Also @hat/test-suite to access recent test updates. So @hat/help @hat/test-suite: [ffi|my|seq]-[opencl|java|cuda|mock|hip] @hat/test-suite ffi-opencl @hat/test: [ffi|my|seq]-[opencl|java|cuda|mock|hip] classToTest (also classToTest#method) @hat/test ffi-opencl hat.test.TestMatMul @hat/test ffi-opencl hat.test.TestMatMul#method (note at shell we need to escape #!! ) ------------- Commit messages: - Grrrr whitespace - Added @hat/help and @hat/test-suite Changes: https://git.openjdk.org/babylon/pull/619/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=619&range=00 Stats: 24 lines in 3 files changed: 10 ins; 10 del; 4 mod Patch: https://git.openjdk.org/babylon/pull/619.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/619/head:pull/619 PR: https://git.openjdk.org/babylon/pull/619 From gfrost at openjdk.org Fri Oct 17 12:06:06 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 17 Oct 2025 12:06:06 GMT Subject: git: openjdk/babylon: code-reflection: Added @hat/help and @hat/test-suite Message-ID: Changeset: b944761f Branch: code-reflection Author: Gary Frost Date: 2025-10-17 12:02:17 +0000 URL: https://git.openjdk.org/babylon/commit/b944761feb0000e8b47051cbf16c8e9b207f3fa2 Added @hat/help and @hat/test-suite ! hat/hat.java + hat/hat/help + hat/hat/test-suite From gfrost at openjdk.org Fri Oct 17 12:05:10 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 17 Oct 2025 12:05:10 GMT Subject: [code-reflection] Integrated: Added @hat/help and @hat/test-suite In-Reply-To: References: Message-ID: On Fri, 17 Oct 2025 11:53:47 GMT, Gary Frost wrote: > Added @hat/help (display help) > > Also @hat/test-suite to access recent test updates. > > So > > @hat/help > > @hat/test-suite: [ffi|my|seq]-[opencl|java|cuda|mock|hip] > @hat/test-suite ffi-opencl > > @hat/test: [ffi|my|seq]-[opencl|java|cuda|mock|hip] classToTest (also classToTest#method) > @hat/test ffi-opencl hat.test.TestMatMul > @hat/test ffi-opencl hat.test.TestMatMul#method (note at shell we need to escape #!! ) This pull request has now been integrated. Changeset: b944761f Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/b944761feb0000e8b47051cbf16c8e9b207f3fa2 Stats: 24 lines in 3 files changed: 10 ins; 10 del; 4 mod Added @hat/help and @hat/test-suite ------------- PR: https://git.openjdk.org/babylon/pull/619 From duke at openjdk.org Fri Oct 17 12:48:25 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Fri, 17 Oct 2025 12:48:25 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) Message-ID: This PR contains a series of changes meant to integrate other ONNX providers. * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` * Configurations of providers are present in `oracle.code.onnx.provider`. * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `executeWithOptions` method. * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. Work done in this PR is done together with Lize Raes. ------------- Commit messages: - Another attempt to remove all tabs. - Reconvert modifier of Session createSession(Arena arena, byte[] model, SessionOptions options) to private. - Attempt to remove whitespaces in OnnxProtoBuilder.java - Add support for other onnx providers (CoreML) Changes: https://git.openjdk.org/babylon/pull/618/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=00 Stats: 1084 lines in 14 files changed: 1075 ins; 4 del; 5 mod Patch: https://git.openjdk.org/babylon/pull/618.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/618/head:pull/618 PR: https://git.openjdk.org/babylon/pull/618 From duke at openjdk.org Fri Oct 17 12:53:44 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Fri, 17 Oct 2025 12:53:44 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: References: Message-ID: > This PR contains a series of changes meant to integrate other ONNX providers. > > * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` > * Configurations of providers are present in `oracle.code.onnx.provider`. > * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `executeWithOptions` method. > * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. > * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. > > Work done in this PR is done together with Lize Raes. Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Update full name ------------- Changes: - all: https://git.openjdk.org/babylon/pull/618/files - new: https://git.openjdk.org/babylon/pull/618/files/a76a9ef2..df32b1eb Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/618.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/618/head:pull/618 PR: https://git.openjdk.org/babylon/pull/618 From asotona at openjdk.org Fri Oct 17 13:04:37 2025 From: asotona at openjdk.org (Adam Sotona) Date: Fri, 17 Oct 2025 13:04:37 GMT Subject: [code-reflection] Integrated: OnnxProtoBuilder fixes In-Reply-To: References: Message-ID: On Thu, 16 Oct 2025 13:37:13 GMT, Adam Sotona wrote: > - fixes ONNX graph output name of returned tuple element > - fixes String AttributeProto value This pull request has now been integrated. Changeset: 02d3c681 Author: Adam Sotona URL: https://git.openjdk.org/babylon/commit/02d3c681cdc21976cdbe293be8f49aaea352d706 Stats: 7 lines in 1 file changed: 6 ins; 1 del; 0 mod OnnxProtoBuilder fixes ------------- PR: https://git.openjdk.org/babylon/pull/614 From asotona at openjdk.org Fri Oct 17 13:06:34 2025 From: asotona at openjdk.org (Adam Sotona) Date: Fri, 17 Oct 2025 13:06:34 GMT Subject: git: openjdk/babylon: code-reflection: OnnxProtoBuilder fixes Message-ID: Changeset: 02d3c681 Branch: code-reflection Author: Adam Sotona Date: 2025-10-17 13:01:55 +0000 URL: https://git.openjdk.org/babylon/commit/02d3c681cdc21976cdbe293be8f49aaea352d706 OnnxProtoBuilder fixes ! cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxProtoBuilder.java From asotona at openjdk.org Fri Oct 17 13:30:16 2025 From: asotona at openjdk.org (Adam Sotona) Date: Fri, 17 Oct 2025 13:30:16 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: References: Message-ID: On Fri, 17 Oct 2025 12:53:44 GMT, Ana Maria Mihalceanu wrote: >> This PR contains a series of changes meant to integrate other ONNX providers. >> >> * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` >> * Configurations of providers are present in `oracle.code.onnx.provider`. >> * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `executeWithOptions` method. >> * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. >> * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. >> >> Work done in this PR is done together with Lize Raes. > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Update full name Generally it looks great, thank you for the contribution! cr-examples/onnx/setup.sh line 1: > 1: #!/bin/bash Files related to (re)generation of the library could be better stored under opgen folder/project. cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxRuntime.java line 244: > 242: } > 243: > 244: public static T executeWithOptions(Arena arena, MethodHandles.Lookup l, OnnxFunction codeLambda, SessionOptions options) { I would recommend to make this method as an override of execute. Original execute duplicates the code, so it can delegate with no options instead. cr-examples/onnx/src/test/resources/oracle/code/onnx/fer/emotion-ferplus-8.onnx.data line 1: > 1: ?O:=;z? References: Message-ID: On Fri, 17 Oct 2025 13:26:17 GMT, Adam Sotona wrote: >> Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: >> >> Update full name > > cr-examples/onnx/src/test/resources/oracle/code/onnx/fer/emotion-ferplus-8.onnx.data line 1: > >> 1: ?O:=;z? > We should double-check if it is OK to store 33M binary directly into the Git repo. It's generally not ok. We should avoid committing any binary files, large or small, and instead provide instructions or a script to download such files. Especially, since this is in the Babylon repo, so everyone cloning this repo will be impacted. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2440238252 From duke at openjdk.org Fri Oct 17 14:58:35 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Fri, 17 Oct 2025 14:58:35 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: References: Message-ID: On Fri, 17 Oct 2025 14:33:40 GMT, Paul Sandoz wrote: >> cr-examples/onnx/src/test/resources/oracle/code/onnx/fer/emotion-ferplus-8.onnx.data line 1: >> >>> 1: ?O:=;z?> >> We should double-check if it is OK to store 33M binary directly into the Git repo. > > It's generally not ok. We should avoid committing any binary files, large or small, and instead provide instructions or a script to download such files. Especially, since this is in the Babylon repo, so everyone cloning this repo will be impacted. I followed the example from: https://github.com/openjdk/babylon/tree/code-reflection/cr-examples/onnx/src/test/resources/oracle/code/onnx/mnist. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2440300513 From duke at openjdk.org Fri Oct 17 15:11:54 2025 From: duke at openjdk.org (Adam Pocock) Date: Fri, 17 Oct 2025 15:11:54 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: References: Message-ID: On Fri, 17 Oct 2025 12:53:44 GMT, Ana Maria Mihalceanu wrote: >> This PR contains a series of changes meant to integrate other ONNX providers. >> >> * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` >> * Configurations of providers are present in `oracle.code.onnx.provider`. >> * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `executeWithOptions` method. >> * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. >> * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. >> >> Work done in this PR is done together with Lize Raes. > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Update full name cr-examples/onnx/src/main/java/oracle/code/onnx/provider/CoreMLProvider.java line 42: > 40: try { > 41: int coremlFlag = COREML_FLAG_USE_CPU_AND_GPU(); > 42: var status = OrtSessionOptionsAppendExecutionProvider_CoreML(sessionOptionsAddress, coremlFlag); The [ML_PROGRAM flag](https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h#L32) is probably useful to turn on here as it expands the set of things that ORT can accelerate with CoreML (e.g. I can't get it to do anything to [sd4j](https://github.com/oracle/sd4j) without it, but it does help a bit with it, or at least it did when I tested it in 2023). ML programs are the more modern way of accelerating things with CoreML, but they might need slightly higher OS versions. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2440337171 From asotona at openjdk.org Fri Oct 17 15:21:39 2025 From: asotona at openjdk.org (Adam Sotona) Date: Fri, 17 Oct 2025 15:21:39 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: References: Message-ID: <4uwwf8yd7LpVYO94At_q1B0s5z2biEfSbW1DFibMWM4=.f87ff0d8-44d7-489c-8151-8baf64d89c7b@github.com> On Fri, 17 Oct 2025 14:55:36 GMT, Ana Maria Mihalceanu wrote: >> It's generally not ok. We should avoid committing any binary files, large or small, and instead provide instructions or a script to download such files. Especially, since this is in the Babylon repo, so everyone cloning this repo will be impacted. > > I followed the example from: > https://github.com/openjdk/babylon/tree/code-reflection/cr-examples/onnx/src/test/resources/oracle/code/onnx/mnist. Right, we needed one model with weights to be a part of the build tests and MNIST weights are just ~170K. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2440365413 From duke at openjdk.org Fri Oct 17 17:06:12 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 17 Oct 2025 17:06:12 GMT Subject: [code-reflection] RFR: Add kernel entrypoint to ModuleOp [v3] In-Reply-To: References: Message-ID: > Include the kernel (and compute) entrypoints in their respective ModuleOps. Ruby Chen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: - Merge branch 'code-reflection' into cleanup - Merge branch 'code-reflection' into cleanup - Add kernel entrypoint to ModuleOp ------------- Changes: https://git.openjdk.org/babylon/pull/605/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=605&range=02 Stats: 11 lines in 2 files changed: 4 ins; 5 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/605.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/605/head:pull/605 PR: https://git.openjdk.org/babylon/pull/605 From duke at openjdk.org Fri Oct 17 17:10:22 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 17 Oct 2025 17:10:22 GMT Subject: [code-reflection] RFR: Update buffer tagging with arrayview support [v2] In-Reply-To: References: Message-ID: <1jdULGHfHB4nCUXUpVPryHcmGqIfOoAX82UivLaw8gc=.2010ead2-2d31-4acd-9aa7-338abe739c73@github.com> > Add buffer tagging for array views, and also use `elements()` instead of `traverse()`. Ruby Chen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge branch 'code-reflection' into module-op-support - Update buffer tagging with arrayview support ------------- Changes: https://git.openjdk.org/babylon/pull/610/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=610&range=01 Stats: 39 lines in 2 files changed: 17 ins; 3 del; 19 mod Patch: https://git.openjdk.org/babylon/pull/610.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/610/head:pull/610 PR: https://git.openjdk.org/babylon/pull/610 From gfrost at openjdk.org Sun Oct 19 13:56:11 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sun, 19 Oct 2025 13:56:11 GMT Subject: git: openjdk/babylon: code-reflection: Added simple map transformer to OpTk + Config convenience methods Message-ID: <126bb535-59a7-4fb0-8d2b-32d0f0516b67@openjdk.org> Changeset: d509d3a0 Branch: code-reflection Author: Gary Frost Date: 2025-10-19 13:55:21 +0000 URL: https://git.openjdk.org/babylon/commit/d509d3a0f0283680668f6ecb80a229ae6da5f24a Added simple map transformer to OpTk + Config convenience methods ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaBackend.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackend.java ! hat/core/src/main/java/hat/Accelerator.java ! hat/core/src/main/java/hat/Config.java ! hat/core/src/main/java/hat/optools/OpTk.java ! hat/core/src/main/java/hat/phases/HATDialectifyBarrierPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyMemoryPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyThreadsPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVSelectPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorOpPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorStorePhase.java + hat/examples/experiments/src/main/java/experiments/TransformState.java ! hat/examples/mandel/src/main/java/mandel/Main.java ! hat/examples/violajones/src/main/java/violajones/Main.java From gfrost at openjdk.org Sun Oct 19 13:59:10 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sun, 19 Oct 2025 13:59:10 GMT Subject: [code-reflection] Integrated: Added simple map transformer to OpTk + Config convenience methods Message-ID: <9BWA-AV6SePiCK9E9KgbPf3aR0eYFoSYN5rAgnoJCaA=.e77b7589-f462-4077-affb-c3fb57c02d26@github.com> Trying to minimize op.transform ceremony. Added a strawman simple mapping transformer to OpTk. Also added some convenience methods to Config. ------------- Commit messages: - Added simple map transformer to OpTk + Config convenience methods Changes: https://git.openjdk.org/babylon/pull/620/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=620&range=00 Stats: 339 lines in 16 files changed: 288 ins; 10 del; 41 mod Patch: https://git.openjdk.org/babylon/pull/620.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/620/head:pull/620 PR: https://git.openjdk.org/babylon/pull/620 From gfrost at openjdk.org Sun Oct 19 13:59:11 2025 From: gfrost at openjdk.org (Gary Frost) Date: Sun, 19 Oct 2025 13:59:11 GMT Subject: [code-reflection] Integrated: Added simple map transformer to OpTk + Config convenience methods In-Reply-To: <9BWA-AV6SePiCK9E9KgbPf3aR0eYFoSYN5rAgnoJCaA=.e77b7589-f462-4077-affb-c3fb57c02d26@github.com> References: <9BWA-AV6SePiCK9E9KgbPf3aR0eYFoSYN5rAgnoJCaA=.e77b7589-f462-4077-affb-c3fb57c02d26@github.com> Message-ID: On Sun, 19 Oct 2025 13:52:34 GMT, Gary Frost wrote: > Trying to minimize op.transform ceremony. > > Added a strawman simple mapping transformer to OpTk. > > Also added some convenience methods to Config. This pull request has now been integrated. Changeset: d509d3a0 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/d509d3a0f0283680668f6ecb80a229ae6da5f24a Stats: 339 lines in 16 files changed: 288 ins; 10 del; 41 mod Added simple map transformer to OpTk + Config convenience methods ------------- PR: https://git.openjdk.org/babylon/pull/620 From gfrost at openjdk.org Mon Oct 20 14:10:16 2025 From: gfrost at openjdk.org (Gary Frost) Date: Mon, 20 Oct 2025 14:10:16 GMT Subject: [code-reflection] Integrated: first pass at mapping HATOp phase Transformers to us OpTk form Message-ID: After adding some helper classes (for simpletransforms and filtered transforms) I took a stab at refactoring the HatOp transformers. More work to do ------------- Commit messages: - first pass at mapping HATOp phase Transformers to us OpTk form Changes: https://git.openjdk.org/babylon/pull/621/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=621&range=00 Stats: 1580 lines in 34 files changed: 676 ins; 704 del; 200 mod Patch: https://git.openjdk.org/babylon/pull/621.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/621/head:pull/621 PR: https://git.openjdk.org/babylon/pull/621 From gfrost at openjdk.org Mon Oct 20 14:10:18 2025 From: gfrost at openjdk.org (Gary Frost) Date: Mon, 20 Oct 2025 14:10:18 GMT Subject: [code-reflection] Integrated: first pass at mapping HATOp phase Transformers to us OpTk form In-Reply-To: References: Message-ID: On Mon, 20 Oct 2025 14:04:37 GMT, Gary Frost wrote: > After adding some helper classes (for simpletransforms and filtered transforms) I took a stab at refactoring the HatOp transformers. > > More work to do This pull request has now been integrated. Changeset: 00e7c5c6 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/00e7c5c6ad0417a580df7736d6086f15cf8cea9e Stats: 1580 lines in 34 files changed: 676 ins; 704 del; 200 mod first pass at mapping HATOp phase Transformers to us OpTk form ------------- PR: https://git.openjdk.org/babylon/pull/621 From gfrost at openjdk.org Mon Oct 20 14:13:15 2025 From: gfrost at openjdk.org (Gary Frost) Date: Mon, 20 Oct 2025 14:13:15 GMT Subject: git: openjdk/babylon: code-reflection: first pass at mapping HATOp phase Transformers to us OpTk form Message-ID: <6795c87d-22e4-45f1-b260-e3eac26e6d38@openjdk.org> Changeset: 00e7c5c6 Branch: code-reflection Author: Gary Frost Date: 2025-10-20 14:07:10 +0000 URL: https://git.openjdk.org/babylon/commit/00e7c5c6ad0417a580df7736d6086f15cf8cea9e first pass at mapping HATOp phase Transformers to us OpTk form ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLHatKernelBuilder.java ! hat/core/src/main/java/hat/callgraph/KernelCallGraph.java ! hat/core/src/main/java/hat/codebuilders/BabylonOpBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilderWithContext.java ! hat/core/src/main/java/hat/dialect/HATBarrierOp.java ! hat/core/src/main/java/hat/dialect/HATMemoryOp.java ! hat/core/src/main/java/hat/dialect/HATOp.java - hat/core/src/main/java/hat/dialect/HATVSelectLoadOp.java - hat/core/src/main/java/hat/dialect/HATVSelectStoreOp.java ! hat/core/src/main/java/hat/dialect/HATVectorBinaryOp.java + hat/core/src/main/java/hat/dialect/HATVectorSelectLoadOp.java + hat/core/src/main/java/hat/dialect/HATVectorSelectStoreOp.java ! hat/core/src/main/java/hat/dialect/HATVectorStoreView.java ! hat/core/src/main/java/hat/optools/OpTk.java - hat/core/src/main/java/hat/phases/HATCompilationTier.java + hat/core/src/main/java/hat/phases/HATDialect.java - hat/core/src/main/java/hat/phases/HATDialectAbstractPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyBarrierPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyMemoryPhase.java + hat/core/src/main/java/hat/phases/HATDialectifyMemoryPrivatePhase.java + hat/core/src/main/java/hat/phases/HATDialectifyMemorySharedPhase.java - hat/core/src/main/java/hat/phases/HATDialectifyPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyThreadsPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyTier.java - hat/core/src/main/java/hat/phases/HATDialectifyVSelectPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorOpPhase.java + hat/core/src/main/java/hat/phases/HATDialectifyVectorSelectPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorStorePhase.java ! hat/core/src/main/java/hat/phases/HATFinalDetectionPhase.java - hat/core/src/main/java/hat/phases/HATPhase.java ! hat/tools/src/main/java/hat/tools/text/JavaHATCodeBuilder.java From duke at openjdk.org Mon Oct 20 14:36:40 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 20 Oct 2025 14:36:40 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v3] In-Reply-To: References: Message-ID: > This PR contains a series of changes meant to integrate other ONNX providers. > > * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` > * Configurations of providers are present in `oracle.code.onnx.provider`. > * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `executeWithOptions` method. > * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. > * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. > > Work done in this PR is done together with [Lize Raes](https://github.com/LizeRaes). Ana Maria Mihalceanu has updated the pull request incrementally with two additional commits since the last revision: - Revert logging level to error. - Refactor OnnxRuntime and CoreMLProvider to address PR comments. ------------- Changes: - all: https://git.openjdk.org/babylon/pull/618/files - new: https://git.openjdk.org/babylon/pull/618/files/df32b1eb..293d6e77 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=02 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=01-02 Stats: 129 lines in 10 files changed: 44 ins; 69 del; 16 mod Patch: https://git.openjdk.org/babylon/pull/618.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/618/head:pull/618 PR: https://git.openjdk.org/babylon/pull/618 From duke at openjdk.org Mon Oct 20 14:36:43 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 20 Oct 2025 14:36:43 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: References: Message-ID: On Fri, 17 Oct 2025 13:25:07 GMT, Adam Sotona wrote: >> Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: >> >> Update full name > > cr-examples/onnx/opgen/setup.sh line 1: > >> (failed to retrieve contents of file, check the PR for context) > Files related to (re)generation of the library could be better stored under opgen folder/project. I moved the files to `opgen` and changed the instructions accordingly. > cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxRuntime.java line 244: > >> 242: } >> 243: >> 244: public static T executeWithOptions(Arena arena, MethodHandles.Lookup l, OnnxFunction codeLambda, SessionOptions options) { > > I would recommend to make this method as an override of execute. > Original execute duplicates the code, so it can delegate with no options instead. Adam, can you please check the refactoring done for execute? ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445195367 PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445204160 From duke at openjdk.org Mon Oct 20 14:58:06 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 20 Oct 2025 14:58:06 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v4] In-Reply-To: References: Message-ID: > This PR contains a series of changes meant to integrate other ONNX providers. > > * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` > * Configurations of providers are present in `oracle.code.onnx.provider`. > * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `execute` that gets `SessionOptions` too. > * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. > * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. > > Work done in this PR is done together with [Lize Raes](https://github.com/LizeRaes). Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Remove tabs and convert to whitespaces only. ------------- Changes: - all: https://git.openjdk.org/babylon/pull/618/files - new: https://git.openjdk.org/babylon/pull/618/files/293d6e77..db73b054 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=03 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=02-03 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/babylon/pull/618.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/618/head:pull/618 PR: https://git.openjdk.org/babylon/pull/618 From duke at openjdk.org Mon Oct 20 14:58:12 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 20 Oct 2025 14:58:12 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: <4uwwf8yd7LpVYO94At_q1B0s5z2biEfSbW1DFibMWM4=.f87ff0d8-44d7-489c-8151-8baf64d89c7b@github.com> References: <4uwwf8yd7LpVYO94At_q1B0s5z2biEfSbW1DFibMWM4=.f87ff0d8-44d7-489c-8151-8baf64d89c7b@github.com> Message-ID: On Fri, 17 Oct 2025 15:19:23 GMT, Adam Sotona wrote: >> I followed the example from: >> https://github.com/openjdk/babylon/tree/code-reflection/cr-examples/onnx/src/test/resources/oracle/code/onnx/mnist. > > Right, we needed one model with weights to be a part of the build tests and MNIST weights are just ~170K. I removed the file with weights and I updated the README instructions to have it downloaded from https://github.com/ammbra/fer-model-weights/raw/refs/heads/main/emotion-ferplus-8.onnx.data. My other ideas involved having a ? script or publishing to Hugging Face. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445249351 From duke at openjdk.org Mon Oct 20 14:58:10 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 20 Oct 2025 14:58:10 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: References: Message-ID: <7lZDtQS9Ynr55gcMgi9siVuTgXj2xTbjYVbk8_49BWg=.afe181c5-bfe9-4b04-990c-5b0431972fc6@github.com> On Fri, 17 Oct 2025 15:08:47 GMT, Adam Pocock wrote: >> Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: >> >> Update full name > > cr-examples/onnx/src/main/java/oracle/code/onnx/provider/CoreMLProvider.java line 42: > >> 40: try { >> 41: int coremlFlag = COREML_FLAG_USE_CPU_AND_GPU(); >> 42: var status = OrtSessionOptionsAppendExecutionProvider_CoreML(sessionOptionsAddress, coremlFlag); > > The [ML_PROGRAM flag](https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h#L32) is probably useful to turn on here as it expands the set of things that ORT can accelerate with CoreML (e.g. I can't get it to do anything to [sd4j](https://github.com/oracle/sd4j) without it, but it does help a bit with it, or at least it did when I tested it in 2023). ML programs are the more modern way of accelerating things with CoreML, but they might need slightly higher OS versions. That's a very good point. The flag should not be hardcoded so I made it configurable. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445262034 From duke at openjdk.org Mon Oct 20 15:27:38 2025 From: duke at openjdk.org (Adam Pocock) Date: Mon, 20 Oct 2025 15:27:38 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v4] In-Reply-To: References: Message-ID: On Mon, 20 Oct 2025 14:58:06 GMT, Ana Maria Mihalceanu wrote: >> This PR contains a series of changes meant to integrate other ONNX providers. >> >> * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` >> * Configurations of providers are present in `oracle.code.onnx.provider`. >> * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `execute` that gets `SessionOptions` too. >> * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. >> * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. >> >> Work done in this PR is done together with [Lize Raes](https://github.com/LizeRaes). > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Remove tabs and convert to whitespaces only. cr-examples/onnx/src/main/java/oracle/code/onnx/provider/CoreMLProvider.java line 38: > 36: private int flag; > 37: > 38: public CoreMLProvider(int flag) { This is a small thing, but I'd probably call this `flags` as it's really a set of bits, so you can or the flags together to get a set of things to turn on. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445349066 From asotona at openjdk.org Mon Oct 20 15:37:40 2025 From: asotona at openjdk.org (Adam Sotona) Date: Mon, 20 Oct 2025 15:37:40 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v2] In-Reply-To: References: Message-ID: On Mon, 20 Oct 2025 14:33:03 GMT, Ana Maria Mihalceanu wrote: >> cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxRuntime.java line 244: >> >>> 242: } >>> 243: >>> 244: public static T executeWithOptions(Arena arena, MethodHandles.Lookup l, OnnxFunction codeLambda, SessionOptions options) { >> >> I would recommend to make this method as an override of execute. >> Original execute duplicates the code, so it can delegate with no options instead. > > Adam, can you please check the refactoring done for execute? Yes, it looks good now. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445375325 From gfrost at openjdk.org Mon Oct 20 15:56:52 2025 From: gfrost at openjdk.org (Gary Frost) Date: Mon, 20 Oct 2025 15:56:52 GMT Subject: [code-reflection] RFR: Quick hack to allow us to override codegen with annotation Message-ID: <49d_yq_0ONjCprZiAmLduEK5_DVL-25HjSzAOHqQ9hY=.48050ba6-e5eb-47b9-9f4a-9ec15f4b77ad@github.com> This allows us to override codegen (for experiments and to prototype cogegen fixes) Add this to @CodeReflection annotated kernel entrypoints. @Kernel(""" //kernel code """) If you need to add a new type (shared private mem) @TypeDef(""" typedef struct SharedS32x256Array_s{ int array[32]; }SharedS32x256Array_t; """ ) See PrefixSum as an example. ------------- Commit messages: - Quick hack to allow us to override codegen with annotation Changes: https://git.openjdk.org/babylon/pull/622/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=622&range=00 Stats: 135 lines in 4 files changed: 68 ins; 32 del; 35 mod Patch: https://git.openjdk.org/babylon/pull/622.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/622/head:pull/622 PR: https://git.openjdk.org/babylon/pull/622 From gfrost at openjdk.org Mon Oct 20 16:04:41 2025 From: gfrost at openjdk.org (Gary Frost) Date: Mon, 20 Oct 2025 16:04:41 GMT Subject: [code-reflection] Integrated: Quick hack to allow us to override codegen with annotation In-Reply-To: <49d_yq_0ONjCprZiAmLduEK5_DVL-25HjSzAOHqQ9hY=.48050ba6-e5eb-47b9-9f4a-9ec15f4b77ad@github.com> References: <49d_yq_0ONjCprZiAmLduEK5_DVL-25HjSzAOHqQ9hY=.48050ba6-e5eb-47b9-9f4a-9ec15f4b77ad@github.com> Message-ID: On Mon, 20 Oct 2025 15:51:58 GMT, Gary Frost wrote: > This allows us to override codegen (for experiments and to prototype cogegen fixes) > > Add this to @CodeReflection annotated kernel entrypoints. > > > @Kernel(""" > //kernel code > """) > > > If you need to add a new type (shared private mem) > > @TypeDef(""" > typedef struct SharedS32x256Array_s{ > int array[32]; > }SharedS32x256Array_t; > """ ) > > > See PrefixSum as an example. This pull request has now been integrated. Changeset: d6ec0a5f Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/d6ec0a5f0a2ff334a58e2d2bfcaff6d658f5f5d4 Stats: 135 lines in 4 files changed: 68 ins; 32 del; 35 mod Quick hack to allow us to override codegen with annotation ------------- PR: https://git.openjdk.org/babylon/pull/622 From gfrost at openjdk.org Mon Oct 20 16:05:25 2025 From: gfrost at openjdk.org (Gary Frost) Date: Mon, 20 Oct 2025 16:05:25 GMT Subject: git: openjdk/babylon: code-reflection: Quick hack to allow us to override codegen with annotation Message-ID: Changeset: d6ec0a5f Branch: code-reflection Author: Gary Frost Date: 2025-10-20 16:02:08 +0000 URL: https://git.openjdk.org/babylon/commit/d6ec0a5f0a2ff334a58e2d2bfcaff6d658f5f5d4 Quick hack to allow us to override codegen with annotation ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java = hat/core/src/main/java/hat/annotations/TypeDef.java ! hat/core/src/main/java/hat/codebuilders/TextBuilder.java ! hat/examples/experiments/src/main/java/experiments/PrefixSum.java From duke at openjdk.org Mon Oct 20 16:12:30 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 20 Oct 2025 16:12:30 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v5] In-Reply-To: References: Message-ID: > This PR contains a series of changes meant to integrate other ONNX providers. > > * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` > * Configurations of providers are present in `oracle.code.onnx.provider`. > * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `execute` that gets `SessionOptions` too. > * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. > * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. > > Work done in this PR is done together with [Lize Raes](https://github.com/LizeRaes). Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Rename field to flags for consistency with the Native API. ------------- Changes: - all: https://git.openjdk.org/babylon/pull/618/files - new: https://git.openjdk.org/babylon/pull/618/files/db73b054..d2802dde Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=04 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=618&range=03-04 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/babylon/pull/618.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/618/head:pull/618 PR: https://git.openjdk.org/babylon/pull/618 From duke at openjdk.org Mon Oct 20 16:12:33 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 20 Oct 2025 16:12:33 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v4] In-Reply-To: References: Message-ID: On Mon, 20 Oct 2025 15:25:23 GMT, Adam Pocock wrote: >> Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove tabs and convert to whitespaces only. > > cr-examples/onnx/src/main/java/oracle/code/onnx/provider/CoreMLProvider.java line 38: > >> 36: private int flag; >> 37: >> 38: public CoreMLProvider(int flag) { > > This is a small thing, but I'd probably call this `flags` as it's really a set of bits, so you can or the flags together to get a set of things to turn on. Done ? ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445467905 From asotona at openjdk.org Mon Oct 20 16:45:27 2025 From: asotona at openjdk.org (Adam Sotona) Date: Mon, 20 Oct 2025 16:45:27 GMT Subject: [code-reflection] RFR: BytecodeLift and related tests move under tests bytecode/lift Message-ID: `BytecodeLift`, all related code and tests moved under `test/jdk/java/lang/reflect/code/bytecode/lift` ------------- Commit messages: - BytecodeLift and related tests move under test/jdk/java/lang/reflect/code/bytecode/lift Changes: https://git.openjdk.org/babylon/pull/623/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=623&range=00 Stats: 810 lines in 14 files changed: 710 ins; 85 del; 15 mod Patch: https://git.openjdk.org/babylon/pull/623.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/623/head:pull/623 PR: https://git.openjdk.org/babylon/pull/623 From asotona at openjdk.org Mon Oct 20 18:14:32 2025 From: asotona at openjdk.org (Adam Sotona) Date: Mon, 20 Oct 2025 18:14:32 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v5] In-Reply-To: References: Message-ID: On Mon, 20 Oct 2025 16:12:30 GMT, Ana Maria Mihalceanu wrote: >> This PR contains a series of changes meant to integrate other ONNX providers. >> >> * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` >> * Configurations of providers are present in `oracle.code.onnx.provider`. >> * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `execute` that gets `SessionOptions` too. >> * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. >> * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. >> >> Work done in this PR is done together with [Lize Raes](https://github.com/LizeRaes). > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Rename field to flags for consistency with the Native API. Marked as reviewed by asotona (Reviewer). ------------- PR Review: https://git.openjdk.org/babylon/pull/618#pullrequestreview-3357458900 From duke at openjdk.org Mon Oct 20 18:26:33 2025 From: duke at openjdk.org (duke) Date: Mon, 20 Oct 2025 18:26:33 GMT Subject: [code-reflection] RFR: Add support for other onnx providers (CoreML) [v5] In-Reply-To: References: Message-ID: <9SDxTvGQe07bFcPwc-C3uvVO8-FruYS-9APFcBEV8So=.684d7f45-36e2-4a3e-bb6a-0100bb205d76@github.com> On Mon, 20 Oct 2025 16:12:30 GMT, Ana Maria Mihalceanu wrote: >> This PR contains a series of changes meant to integrate other ONNX providers. >> >> * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` >> * Configurations of providers are present in `oracle.code.onnx.provider`. >> * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `execute` that gets `SessionOptions` too. >> * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. >> * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. >> >> Work done in this PR is done together with [Lize Raes](https://github.com/LizeRaes). > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Rename field to flags for consistency with the Native API. @ammbra Your change (at version d2802dde059851124dd6caf22d81cf2deaecf37a) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/babylon/pull/618#issuecomment-3423259040 From psandoz at openjdk.org Mon Oct 20 19:53:41 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Mon, 20 Oct 2025 19:53:41 GMT Subject: [code-reflection] RFR: BytecodeLift and related tests move under tests bytecode/lift In-Reply-To: References: Message-ID: On Mon, 20 Oct 2025 16:38:28 GMT, Adam Sotona wrote: > `BytecodeLift`, all related code and tests moved under `test/jdk/java/lang/reflect/code/bytecode/lift` Looks good. Note to other folks that might be observing, this is a tactical move in preparation for incubation, reducing the pressure on code review, maintenance, and testing. We think the lifter is strategic feature, and longer term it will likely move back into the incubating module in a more robust form. ------------- Marked as reviewed by psandoz (Lead). PR Review: https://git.openjdk.org/babylon/pull/623#pullrequestreview-3357721040 From asotona at openjdk.org Tue Oct 21 07:41:38 2025 From: asotona at openjdk.org (Adam Sotona) Date: Tue, 21 Oct 2025 07:41:38 GMT Subject: git: openjdk/babylon: code-reflection: Add support for other onnx providers (CoreML) Message-ID: Changeset: a43beadb Branch: code-reflection Author: ammbra Committer: Adam Sotona Date: 2025-10-21 07:38:50 +0000 URL: https://git.openjdk.org/babylon/commit/a43beadb9347f7ce03d3d7f9b27e83fef5b7cf3f Add support for other onnx providers (CoreML) Reviewed-by: asotona ! cr-examples/onnx/README.md + cr-examples/onnx/opgen/setup.sh + cr-examples/onnx/opgen/symbols ! cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxProtoBuilder.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxRuntime.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/coreml_provider_factory_h.java + cr-examples/onnx/src/main/java/oracle/code/onnx/provider/CoreMLProvider.java + cr-examples/onnx/src/main/java/oracle/code/onnx/provider/OnnxProvider.java + cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERCoreMLDemo.java + cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERInference.java + cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERModel.java + cr-examples/onnx/src/test/resources/oracle/code/onnx/fer/happy.png + cr-examples/onnx/src/test/resources/oracle/code/onnx/fer/sad.png From duke at openjdk.org Tue Oct 21 07:41:46 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Tue, 21 Oct 2025 07:41:46 GMT Subject: [code-reflection] Integrated: Add support for other onnx providers (CoreML) In-Reply-To: References: Message-ID: On Fri, 17 Oct 2025 11:45:24 GMT, Ana Maria Mihalceanu wrote: > This PR contains a series of changes meant to integrate other ONNX providers. > > * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h` > * Configurations of providers are present in `oracle.code.onnx.provider`. > * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `execute` that gets `SessionOptions` too. > * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`. > * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software. > > Work done in this PR is done together with [Lize Raes](https://github.com/LizeRaes). This pull request has now been integrated. Changeset: a43beadb Author: ammbra Committer: Adam Sotona URL: https://git.openjdk.org/babylon/commit/a43beadb9347f7ce03d3d7f9b27e83fef5b7cf3f Stats: 1067 lines in 13 files changed: 1050 ins; 3 del; 14 mod Add support for other onnx providers (CoreML) Reviewed-by: asotona ------------- PR: https://git.openjdk.org/babylon/pull/618 From asotona at openjdk.org Tue Oct 21 07:45:33 2025 From: asotona at openjdk.org (Adam Sotona) Date: Tue, 21 Oct 2025 07:45:33 GMT Subject: git: openjdk/babylon: code-reflection: BytecodeLift and related tests move under tests bytecode/lift Message-ID: Changeset: 987eed59 Branch: code-reflection Author: Adam Sotona Date: 2025-10-21 07:44:46 +0000 URL: https://git.openjdk.org/babylon/commit/987eed59b3bf38c19e70410c35c0759e3125d251 BytecodeLift and related tests move under tests bytecode/lift Reviewed-by: psandoz ! src/jdk.incubator.code/share/classes/jdk/incubator/code/bytecode/impl/BranchCompactor.java - src/jdk.incubator.code/share/classes/jdk/incubator/code/bytecode/impl/BytecodeHelpers.java ! test/jdk/java/lang/reflect/code/bytecode/TestBytecode.java = test/jdk/java/lang/reflect/code/bytecode/lift/BytecodeLift.java = test/jdk/java/lang/reflect/code/bytecode/lift/SlotOp.java = test/jdk/java/lang/reflect/code/bytecode/lift/SlotToVarTransformer.java = test/jdk/java/lang/reflect/code/bytecode/lift/TEST.properties + test/jdk/java/lang/reflect/code/bytecode/lift/TestBytecodeLift.java = test/jdk/java/lang/reflect/code/bytecode/lift/TestLiftCustomBytecode.java = test/jdk/java/lang/reflect/code/bytecode/lift/TestLiftExample.java = test/jdk/java/lang/reflect/code/bytecode/lift/TestSmallCorpus.java = test/jdk/java/lang/reflect/code/bytecode/lift/UnresolvedType.java = test/jdk/java/lang/reflect/code/bytecode/lift/UnresolvedTypesTransformer.java = test/jdk/java/lang/reflect/code/bytecode/lift/Verifier.java From asotona at openjdk.org Tue Oct 21 07:47:44 2025 From: asotona at openjdk.org (Adam Sotona) Date: Tue, 21 Oct 2025 07:47:44 GMT Subject: [code-reflection] RFR: BytecodeLift and related tests move under tests bytecode/lift In-Reply-To: References: Message-ID: On Mon, 20 Oct 2025 16:38:28 GMT, Adam Sotona wrote: > `BytecodeLift`, all related code and tests moved under `test/jdk/java/lang/reflect/code/bytecode/lift` Thank you! ------------- PR Comment: https://git.openjdk.org/babylon/pull/623#issuecomment-3425220130 From asotona at openjdk.org Tue Oct 21 07:47:47 2025 From: asotona at openjdk.org (Adam Sotona) Date: Tue, 21 Oct 2025 07:47:47 GMT Subject: [code-reflection] Integrated: BytecodeLift and related tests move under tests bytecode/lift In-Reply-To: References: Message-ID: On Mon, 20 Oct 2025 16:38:28 GMT, Adam Sotona wrote: > `BytecodeLift`, all related code and tests moved under `test/jdk/java/lang/reflect/code/bytecode/lift` This pull request has now been integrated. Changeset: 987eed59 Author: Adam Sotona URL: https://git.openjdk.org/babylon/commit/987eed59b3bf38c19e70410c35c0759e3125d251 Stats: 810 lines in 14 files changed: 710 ins; 85 del; 15 mod BytecodeLift and related tests move under tests bytecode/lift Reviewed-by: psandoz ------------- PR: https://git.openjdk.org/babylon/pull/623 From jfumero at openjdk.org Tue Oct 21 09:06:13 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 21 Oct 2025 09:06:13 GMT Subject: [code-reflection] RFR: [hat] Initial support for 16-bits float types (half) Message-ID: This PR extends HAT with support for OpenCL and CUDA `half` types. >From the Java side: F16Array.F16 ha = a.array(kernelContext.gix); F16Array.F16 hb = b.array(kernelContext.gix); hb.value(ha.value()); We can also perform some common operations with half types: F16Array.F16 ha = a.array(kernelContext.gix); F16Array.F16 hb = b.array(kernelContext.gix); F16Array.F16 r1 = F16.mul(ha, hb); F16Array.F16 r2 = F16.div(ha, hb); F16Array.F16 r3 = F16.sub(ha, hb); F16Array.F16 r4 = F16.add(r1, r2); F16Array.F16 r5 = F16.mul(r4, r3); F16Array.F16 hC = c.array(kernelContext.gix); To run with FP16, HAT needs to run GPUs with HALF support for both OpenCL and CUDA backends. For example, for OpenCL, it needs to run on devices that support the `cl_khr_fp16` macro. In near future, we will extend with more operations. How to test (OpenCL): HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl hat.test.TestFP16Type CUDA: HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda hat.test.TestFP16Type ------------- Commit messages: - [hat] hatVectorVarLoadOp moved to C99 builder - [hat] cleanup f16phase - [HAT] CUDA backend F16 initial support - [hat] missing header license added - Merge branch 'code-reflection' into hat/types/fp16 - [hat] HalfType unittest fixed - [hat] HalfType for OpenCL and common operations - [hat] Initial implementation for FP16 and OpenCL backend Changes: https://git.openjdk.org/babylon/pull/624/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=624&range=00 Stats: 986 lines in 27 files changed: 929 ins; 44 del; 13 mod Patch: https://git.openjdk.org/babylon/pull/624.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/624/head:pull/624 PR: https://git.openjdk.org/babylon/pull/624 From jfumero at openjdk.org Tue Oct 21 09:31:48 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 21 Oct 2025 09:31:48 GMT Subject: git: openjdk/babylon: code-reflection: [hat] Initial support for 16-bits float types (half) Message-ID: Changeset: 5128c70b Branch: code-reflection Author: Juan Fumero Date: 2025-10-21 09:29:11 +0000 URL: https://git.openjdk.org/babylon/commit/5128c70b87c209d781307cf583826a2f5b8a1a8d [hat] Initial support for 16-bits float types (half) ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/core/src/main/java/hat/buffer/ArgArray.java ! hat/core/src/main/java/hat/buffer/BufferAllocator.java + hat/core/src/main/java/hat/buffer/F16Array.java ! hat/core/src/main/java/hat/buffer/F32Array2D.java ! hat/core/src/main/java/hat/buffer/S08x3RGBImage.java ! hat/core/src/main/java/hat/buffer/S32Array.java ! hat/core/src/main/java/hat/buffer/S32Array2D.java ! hat/core/src/main/java/hat/buffer/S32RGBAImage.java ! hat/core/src/main/java/hat/buffer/U16GreyImage.java ! hat/core/src/main/java/hat/codebuilders/BabylonOpBuilder.java ! hat/core/src/main/java/hat/codebuilders/C99HATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilderWithContext.java ! hat/core/src/main/java/hat/codebuilders/ScopedCodeBuilderContext.java + hat/core/src/main/java/hat/dialect/HATF16BinaryOp.java + hat/core/src/main/java/hat/dialect/HATF16Op.java + hat/core/src/main/java/hat/dialect/HATF16VarLoadOp.java + hat/core/src/main/java/hat/dialect/HATF16VarOp.java ! hat/core/src/main/java/hat/optools/OpTk.java + hat/core/src/main/java/hat/phases/HATDialectifyFP16Phase.java ! hat/core/src/main/java/hat/phases/HATDialectifyTier.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorSelectPhase.java ! hat/hat/test.java + hat/tests/src/main/java/hat/test/TestFP16Type.java ! hat/tools/src/main/java/hat/tools/text/JavaHATCodeBuilder.java From jfumero at openjdk.org Tue Oct 21 09:33:04 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 21 Oct 2025 09:33:04 GMT Subject: [code-reflection] Integrated: [hat] Initial support for 16-bits float types (half) In-Reply-To: References: Message-ID: On Tue, 21 Oct 2025 08:40:11 GMT, Juan Fumero wrote: > This PR extends HAT with support for OpenCL and CUDA `half` types. > > From the Java side: > > > F16Array.F16 ha = a.array(kernelContext.gix); > F16Array.F16 hb = b.array(kernelContext.gix); > hb.value(ha.value()); > > > We can also perform some common operations with half types: > > > F16Array.F16 ha = a.array(kernelContext.gix); > F16Array.F16 hb = b.array(kernelContext.gix); > > F16Array.F16 r1 = F16.mul(ha, hb); > F16Array.F16 r2 = F16.div(ha, hb); > F16Array.F16 r3 = F16.sub(ha, hb); > F16Array.F16 r4 = F16.add(r1, r2); > F16Array.F16 r5 = F16.mul(r4, r3); > F16Array.F16 hC = c.array(kernelContext.gix); > > > To run with FP16, HAT needs to run GPUs with HALF support for both OpenCL and CUDA backends. For example, for OpenCL, it needs to run on devices that support the `cl_khr_fp16` macro. > > In near future, we will extend with more operations. > > How to test (OpenCL): > > > HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl hat.test.TestFP16Type > > > CUDA: > > > HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda hat.test.TestFP16Type This pull request has now been integrated. Changeset: 5128c70b Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/5128c70b87c209d781307cf583826a2f5b8a1a8d Stats: 986 lines in 27 files changed: 929 ins; 44 del; 13 mod [hat] Initial support for 16-bits float types (half) ------------- PR: https://git.openjdk.org/babylon/pull/624 From jfumero at openjdk.org Tue Oct 21 10:05:34 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 21 Oct 2025 10:05:34 GMT Subject: [code-reflection] RFR: [hat] clean-up non-necessary methods for vector types Message-ID: <9CzZKR5kDA6FrSQwrqFVW7A-_D6FrAeQ3SCuu9stOhY=.3f34a1a1-614a-4ecb-8891-b694a37f97f1@github.com> [hat] clean-up non-necessary methods for vector types ------------- Commit messages: - Merge branch 'code-reflection' into hat/cleanup/codegen - [hat] clean-up non-necessary methods for vector types Changes: https://git.openjdk.org/babylon/pull/625/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=625&range=00 Stats: 84 lines in 5 files changed: 1 ins; 73 del; 10 mod Patch: https://git.openjdk.org/babylon/pull/625.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/625/head:pull/625 PR: https://git.openjdk.org/babylon/pull/625 From jfumero at openjdk.org Tue Oct 21 10:13:54 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 21 Oct 2025 10:13:54 GMT Subject: [code-reflection] Integrated: [hat] clean-up non-necessary methods for vector types In-Reply-To: <9CzZKR5kDA6FrSQwrqFVW7A-_D6FrAeQ3SCuu9stOhY=.3f34a1a1-614a-4ecb-8891-b694a37f97f1@github.com> References: <9CzZKR5kDA6FrSQwrqFVW7A-_D6FrAeQ3SCuu9stOhY=.3f34a1a1-614a-4ecb-8891-b694a37f97f1@github.com> Message-ID: On Tue, 21 Oct 2025 09:53:55 GMT, Juan Fumero wrote: > [hat] clean-up non-necessary methods for vector types This pull request has now been integrated. Changeset: 1a3011f0 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/1a3011f07ff182b1d5940c48ed0901aafdaaa5ad Stats: 84 lines in 5 files changed: 1 ins; 73 del; 10 mod [hat] clean-up non-necessary methods for vector types ------------- PR: https://git.openjdk.org/babylon/pull/625 From jfumero at openjdk.org Tue Oct 21 10:14:19 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 21 Oct 2025 10:14:19 GMT Subject: git: openjdk/babylon: code-reflection: [hat] clean-up non-necessary methods for vector types Message-ID: <50b0a264-49f6-496f-b199-058575c36baa@openjdk.org> Changeset: 1a3011f0 Branch: code-reflection Author: Juan Fumero Date: 2025-10-21 10:10:47 +0000 URL: https://git.openjdk.org/babylon/commit/1a3011f07ff182b1d5940c48ed0901aafdaaa5ad [hat] clean-up non-necessary methods for vector types ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/C99HATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilderWithContext.java ! hat/tools/src/main/java/hat/tools/text/JavaHATCodeBuilder.java From gfrost at openjdk.org Tue Oct 21 12:03:21 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 12:03:21 GMT Subject: git: openjdk/babylon: code-reflection: Refactored MemoryPhases to innerclasses Message-ID: <19f86656-59ad-436d-a062-90184c5a8482@openjdk.org> Changeset: 9baa108f Branch: code-reflection Author: Gary Frost Date: 2025-10-21 12:01:55 +0000 URL: https://git.openjdk.org/babylon/commit/9baa108f44555bfa817dfcbac05b3e34f0151bbe Refactored MemoryPhases to innerclasses ! hat/core/src/main/java/hat/phases/HATDialect.java ! hat/core/src/main/java/hat/phases/HATDialectifyBarrierPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyMemoryPhase.java - hat/core/src/main/java/hat/phases/HATDialectifyMemoryPrivatePhase.java - hat/core/src/main/java/hat/phases/HATDialectifyMemorySharedPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyThreadsPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyTier.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorOpPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorSelectPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorStorePhase.java From gfrost at openjdk.org Tue Oct 21 12:04:54 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 12:04:54 GMT Subject: [code-reflection] Integrated: Refactored MemoryPhases to innerclasses Message-ID: More phase transform refactoring. Re-establishing a pattern where we lean on switches over instance patterns (and inheritance) for phases and ops. ------------- Commit messages: - Refactored MemoryPhases to innerclasses Changes: https://git.openjdk.org/babylon/pull/626/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=626&range=00 Stats: 426 lines in 10 files changed: 129 ins; 229 del; 68 mod Patch: https://git.openjdk.org/babylon/pull/626.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/626/head:pull/626 PR: https://git.openjdk.org/babylon/pull/626 From gfrost at openjdk.org Tue Oct 21 12:04:55 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 12:04:55 GMT Subject: [code-reflection] Integrated: Refactored MemoryPhases to innerclasses In-Reply-To: References: Message-ID: On Tue, 21 Oct 2025 11:58:04 GMT, Gary Frost wrote: > More phase transform refactoring. > > Re-establishing a pattern where we lean on switches over instance patterns (and inheritance) for phases and ops. This pull request has now been integrated. Changeset: 9baa108f Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/9baa108f44555bfa817dfcbac05b3e34f0151bbe Stats: 426 lines in 10 files changed: 129 ins; 229 del; 68 mod Refactored MemoryPhases to innerclasses ------------- PR: https://git.openjdk.org/babylon/pull/626 From gfrost at openjdk.org Tue Oct 21 15:07:32 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 15:07:32 GMT Subject: [code-reflection] Integrated: more phase transform refctoring and a fix to hat.java for props Message-ID: More refactoring of transform phases. Also a fix to allow `java @hat/test-suite` ro accept properties. ala java @hat/test-suite ffi-opencl -DHAT=SHOW_COMPILATION_PHASES -DTRACE_CALLSITES=true ------------- Commit messages: - more phase transform refctoring and a fix to hat.java for props Changes: https://git.openjdk.org/babylon/pull/627/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=627&range=00 Stats: 60 lines in 4 files changed: 47 ins; 4 del; 9 mod Patch: https://git.openjdk.org/babylon/pull/627.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/627/head:pull/627 PR: https://git.openjdk.org/babylon/pull/627 From gfrost at openjdk.org Tue Oct 21 15:11:45 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 15:11:45 GMT Subject: git: openjdk/babylon: code-reflection: more phase transform refctoring and a fix to hat.java for props Message-ID: <10297a87-96f0-4414-b0ae-5c0f4a8d9af3@openjdk.org> Changeset: 768bf4c5 Branch: code-reflection Author: Gary Frost Date: 2025-10-21 15:04:14 +0000 URL: https://git.openjdk.org/babylon/commit/768bf4c59b60ce6b12cc23ac44c99ee6a42ba749 more phase transform refctoring and a fix to hat.java for props ! hat/core/src/main/java/hat/phases/HATDialectifyTier.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorOpPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorStorePhase.java ! hat/hat.java From gfrost at openjdk.org Tue Oct 21 15:07:33 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 15:07:33 GMT Subject: [code-reflection] Integrated: more phase transform refctoring and a fix to hat.java for props In-Reply-To: References: Message-ID: On Tue, 21 Oct 2025 14:58:54 GMT, Gary Frost wrote: > More refactoring of transform phases. > > Also a fix to allow `java @hat/test-suite` ro accept properties. > > ala > > java @hat/test-suite ffi-opencl -DHAT=SHOW_COMPILATION_PHASES -DTRACE_CALLSITES=true This pull request has now been integrated. Changeset: 768bf4c5 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/768bf4c59b60ce6b12cc23ac44c99ee6a42ba749 Stats: 60 lines in 4 files changed: 47 ins; 4 del; 9 mod more phase transform refctoring and a fix to hat.java for props ------------- PR: https://git.openjdk.org/babylon/pull/627 From gfrost at openjdk.org Tue Oct 21 15:50:12 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 15:50:12 GMT Subject: git: openjdk/babylon: code-reflection: Added opencl-jextracted-backend to bld Message-ID: <44279b22-b4f7-48f1-b205-e0144ae25d5a@openjdk.org> Changeset: 20e9f4a7 Branch: code-reflection Author: Gary Frost Date: 2025-10-21 15:47:52 +0000 URL: https://git.openjdk.org/babylon/commit/20e9f4a750113bcdd4236080b2a39660268c62bd Added opencl-jextracted-backend to bld ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLHatKernelBuilder.java ! hat/hat.java From gfrost at openjdk.org Tue Oct 21 15:50:52 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 15:50:52 GMT Subject: [code-reflection] Integrated: Added opencl-jextracted-backend to bld Message-ID: I noticed that opencl jextracted backend stub (not working but should be built) was not included in the bld So added it and the backends-jextracted-shared. ------------- Commit messages: - Added opencl-jextracted-backend to bld Changes: https://git.openjdk.org/babylon/pull/628/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=628&range=00 Stats: 15 lines in 2 files changed: 3 ins; 0 del; 12 mod Patch: https://git.openjdk.org/babylon/pull/628.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/628/head:pull/628 PR: https://git.openjdk.org/babylon/pull/628 From gfrost at openjdk.org Tue Oct 21 15:50:54 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 21 Oct 2025 15:50:54 GMT Subject: [code-reflection] Integrated: Added opencl-jextracted-backend to bld In-Reply-To: References: Message-ID: On Tue, 21 Oct 2025 15:43:48 GMT, Gary Frost wrote: > I noticed that opencl jextracted backend stub (not working but should be built) was not included in the bld > > So added it and the backends-jextracted-shared. This pull request has now been integrated. Changeset: 20e9f4a7 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/20e9f4a750113bcdd4236080b2a39660268c62bd Stats: 15 lines in 2 files changed: 3 ins; 0 del; 12 mod Added opencl-jextracted-backend to bld ------------- PR: https://git.openjdk.org/babylon/pull/628 From jfumero at openjdk.org Wed Oct 22 08:40:02 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 22 Oct 2025 08:40:02 GMT Subject: [code-reflection] RFR: [hat] F16 object creation within device code via F16.of Message-ID: <_DLnk1p4Bn4-msvb3eHQclsqPlu3UdvllXdOwJYTHOc=.4d45567b-e64f-497b-bdac-fc9348a8d6ff@github.com> FP16 matmul supported. Example: F16Array.F16 ha = a.array(kernelContext.gix); F16Array.F16 initVal = F16.of( 2.1f); // store new half value ha.value(initVal.value()); How to test: java @hat/test ffi-opencl hat.test.TestFP16Type -DHAT=SHOW_COMPILATION_PHASES -DTRACE_CALLSITES=true ------------- Commit messages: - [hat] Include vmoptions in the hat single test - [hat] jextracted OpenCLHatKernelBuilder fixed - Merge branch 'code-reflection' into hat/fp16/init - [hat] New test for float initialization - [hat] F16 dialect phase refactored - Merge branch 'code-reflection' into hat/fp16/init - [hat] minor cleanup - [hat] Rename F16.init to F16.of - [hat] F16 init values within the device supported Changes: https://git.openjdk.org/babylon/pull/629/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=629&range=00 Stats: 840 lines in 19 files changed: 685 ins; 81 del; 74 mod Patch: https://git.openjdk.org/babylon/pull/629.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/629/head:pull/629 PR: https://git.openjdk.org/babylon/pull/629 From jfumero at openjdk.org Wed Oct 22 08:45:12 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 22 Oct 2025 08:45:12 GMT Subject: [code-reflection] RFR: [hat] F16 object creation within device code via F16.of [v2] In-Reply-To: <_DLnk1p4Bn4-msvb3eHQclsqPlu3UdvllXdOwJYTHOc=.4d45567b-e64f-497b-bdac-fc9348a8d6ff@github.com> References: <_DLnk1p4Bn4-msvb3eHQclsqPlu3UdvllXdOwJYTHOc=.4d45567b-e64f-497b-bdac-fc9348a8d6ff@github.com> Message-ID: <_dLHAiiouPoVwFDbGniBATC2iTDaYl8Ak0wgmqPgKbs=.b683dbd5-cd50-4999-941d-37e68c7099c8@github.com> > FP16 matmul supported. > > Example: > > > F16Array.F16 ha = a.array(kernelContext.gix); > F16Array.F16 initVal = F16.of( 2.1f); > // store new half value > ha.value(initVal.value()); > > > How to test: > > > java @hat/test ffi-opencl hat.test.TestFP16Type -DHAT=SHOW_COMPILATION_PHASES -DTRACE_CALLSITES=true Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] Refactor for F16 instrinsics ------------- Changes: - all: https://git.openjdk.org/babylon/pull/629/files - new: https://git.openjdk.org/babylon/pull/629/files/3cc61d26..a30fc0d2 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=629&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=629&range=00-01 Stats: 30 lines in 4 files changed: 11 ins; 2 del; 17 mod Patch: https://git.openjdk.org/babylon/pull/629.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/629/head:pull/629 PR: https://git.openjdk.org/babylon/pull/629 From jfumero at openjdk.org Wed Oct 22 09:18:09 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 22 Oct 2025 09:18:09 GMT Subject: git: openjdk/babylon: code-reflection: [hat] F16 object creation within device code via F16.of Message-ID: <3006a273-f954-4cf8-bafe-c4939dcd87ec@openjdk.org> Changeset: ae059ba1 Branch: code-reflection Author: Juan Fumero Date: 2025-10-22 09:16:43 +0000 URL: https://git.openjdk.org/babylon/commit/ae059ba17322b9d615cc932e3a26522ba73aa916 [hat] F16 object creation within device code via F16.of ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLHatKernelBuilder.java ! hat/core/src/main/java/hat/buffer/F16Array.java ! hat/core/src/main/java/hat/codebuilders/BabylonOpBuilder.java ! hat/core/src/main/java/hat/codebuilders/HATCodeBuilderWithContext.java + hat/core/src/main/java/hat/dialect/HATF16AddOp.java ! hat/core/src/main/java/hat/dialect/HATF16BinaryOp.java + hat/core/src/main/java/hat/dialect/HATF16ConvOp.java + hat/core/src/main/java/hat/dialect/HATF16DivOp.java + hat/core/src/main/java/hat/dialect/HATF16MulOp.java + hat/core/src/main/java/hat/dialect/HATF16SubOp.java ! hat/core/src/main/java/hat/optools/OpTk.java ! hat/core/src/main/java/hat/phases/HATDialect.java ! hat/core/src/main/java/hat/phases/HATDialectifyFP16Phase.java ! hat/hat.java ! hat/tests/src/main/java/hat/test/TestFP16Type.java ! hat/tests/src/main/java/hat/test/TestMatMul.java ! hat/tools/src/main/java/hat/tools/text/JavaHATCodeBuilder.java From jfumero at openjdk.org Wed Oct 22 09:22:28 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 22 Oct 2025 09:22:28 GMT Subject: [code-reflection] Integrated: [hat] F16 object creation within device code via F16.of In-Reply-To: <_DLnk1p4Bn4-msvb3eHQclsqPlu3UdvllXdOwJYTHOc=.4d45567b-e64f-497b-bdac-fc9348a8d6ff@github.com> References: <_DLnk1p4Bn4-msvb3eHQclsqPlu3UdvllXdOwJYTHOc=.4d45567b-e64f-497b-bdac-fc9348a8d6ff@github.com> Message-ID: On Wed, 22 Oct 2025 08:33:20 GMT, Juan Fumero wrote: > FP16 matmul supported. > > Example: > > > F16Array.F16 ha = a.array(kernelContext.gix); > F16Array.F16 initVal = F16.of( 2.1f); > // store new half value > ha.value(initVal.value()); > > > How to test: > > > java @hat/test ffi-opencl hat.test.TestFP16Type -DHAT=SHOW_COMPILATION_PHASES -DTRACE_CALLSITES=true This pull request has now been integrated. Changeset: ae059ba1 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/ae059ba17322b9d615cc932e3a26522ba73aa916 Stats: 862 lines in 19 files changed: 696 ins; 83 del; 83 mod [hat] F16 object creation within device code via F16.of ------------- PR: https://git.openjdk.org/babylon/pull/629 From jfumero at openjdk.org Wed Oct 22 09:52:04 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 22 Oct 2025 09:52:04 GMT Subject: [code-reflection] RFR: [hat] CPU Implementation for F16 Message-ID: [hat] CPU Implementation for F16 ------------- Commit messages: - [hat] CPU Impl for F16 added Changes: https://git.openjdk.org/babylon/pull/630/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=630&range=00 Stats: 643 lines in 5 files changed: 330 ins; 304 del; 9 mod Patch: https://git.openjdk.org/babylon/pull/630.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/630/head:pull/630 PR: https://git.openjdk.org/babylon/pull/630 From jfumero at openjdk.org Wed Oct 22 09:56:12 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 22 Oct 2025 09:56:12 GMT Subject: git: openjdk/babylon: code-reflection: [hat] CPU Implementation for F16 Message-ID: <26fafe26-586d-45cb-9375-72ec950a606e@openjdk.org> Changeset: 4731bacd Branch: code-reflection Author: Juan Fumero Date: 2025-10-22 09:55:13 +0000 URL: https://git.openjdk.org/babylon/commit/4731bacdbf1779b503fa4f9c31bf092fcfa8517f [hat] CPU Implementation for F16 ! hat/core/src/main/java/hat/buffer/F16Array.java ! hat/hat/test.java + hat/tests/src/main/java/hat/test/TestF16Type.java - hat/tests/src/main/java/hat/test/TestFP16Type.java ! hat/tests/src/main/java/hat/test/TestMatMul.java From jfumero at openjdk.org Wed Oct 22 09:58:27 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 22 Oct 2025 09:58:27 GMT Subject: [code-reflection] Integrated: [hat] CPU Implementation for F16 In-Reply-To: References: Message-ID: On Wed, 22 Oct 2025 09:45:31 GMT, Juan Fumero wrote: > [hat] CPU Implementation for F16 This pull request has now been integrated. Changeset: 4731bacd Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/4731bacdbf1779b503fa4f9c31bf092fcfa8517f Stats: 643 lines in 5 files changed: 330 ins; 304 del; 9 mod [hat] CPU Implementation for F16 ------------- PR: https://git.openjdk.org/babylon/pull/630 From gfrost at openjdk.org Wed Oct 22 13:13:21 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 22 Oct 2025 13:13:21 GMT Subject: git: openjdk/babylon: code-reflection: Phase tranform refactoring and fixed before/after CallSite tracking Message-ID: <8e532667-6c87-4c66-b0a7-095aff09d63f@openjdk.org> Changeset: edb3718a Branch: code-reflection Author: Gary Frost Date: 2025-10-22 13:12:07 +0000 URL: https://git.openjdk.org/babylon/commit/edb3718ae70df775e7bc6edcd146eb7956f68666 Phase tranform refactoring and fixed before/after CallSite tracking ! hat/core/src/main/java/hat/buffer/F32Array.java ! hat/core/src/main/java/hat/buffer/F32ArrayPadded.java ! hat/core/src/main/java/hat/optools/OpTk.java ! hat/core/src/main/java/hat/phases/HATDialectifyMemoryPhase.java From gfrost at openjdk.org Wed Oct 22 13:16:03 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 22 Oct 2025 13:16:03 GMT Subject: [code-reflection] Integrated: Phase tranform refactoring and fixed before/after CallSite tracking Message-ID: Continued refactoring phase transforms Also fixed issue with CallSite. So nowe can turn on SHOW_COMPILATION_PHASES without CALLSITE_TRACING ------------- Commit messages: - More phase tranform refactoring Also fixed before/after CallSite tracking issue Changes: https://git.openjdk.org/babylon/pull/631/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=631&range=00 Stats: 87 lines in 4 files changed: 33 ins; 23 del; 31 mod Patch: https://git.openjdk.org/babylon/pull/631.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/631/head:pull/631 PR: https://git.openjdk.org/babylon/pull/631 From gfrost at openjdk.org Wed Oct 22 13:16:05 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 22 Oct 2025 13:16:05 GMT Subject: [code-reflection] Integrated: Phase tranform refactoring and fixed before/after CallSite tracking In-Reply-To: References: Message-ID: On Wed, 22 Oct 2025 13:09:40 GMT, Gary Frost wrote: > Continued refactoring phase transforms > > Also fixed issue with CallSite. So nowe can turn on SHOW_COMPILATION_PHASES without CALLSITE_TRACING This pull request has now been integrated. Changeset: edb3718a Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/edb3718ae70df775e7bc6edcd146eb7956f68666 Stats: 87 lines in 4 files changed: 33 ins; 23 del; 31 mod Phase tranform refactoring and fixed before/after CallSite tracking ------------- PR: https://git.openjdk.org/babylon/pull/631 From gfrost at openjdk.org Thu Oct 23 09:44:50 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 09:44:50 GMT Subject: git: openjdk/babylon: code-reflection: Added non-hatified view 3d perspective example Message-ID: <59b3bba9-fcd0-462a-8b6b-589ce75ba697@openjdk.org> Changeset: adcb1ea0 Branch: code-reflection Author: Gary Frost Date: 2025-10-23 09:40:54 +0000 URL: https://git.openjdk.org/babylon/commit/adcb1ea06f5a2c0b04e2d944b59e4da1e8226d71 Added non-hatified view 3d perspective example ! hat/examples/pom.xml = hat/examples/view/.gitignore + hat/examples/view/pom.xml + hat/examples/view/src/main/java/view/EliteMeshReader.java + hat/examples/view/src/main/java/view/Main.java + hat/examples/view/src/main/java/view/Rasterizer.java + hat/examples/view/src/main/java/view/View.java + hat/examples/view/src/main/java/view/ViewFrame.java + hat/examples/view/src/main/java/view/ZPos.java + hat/examples/view/src/main/java/view/f32/F32Line3D.java + hat/examples/view/src/main/java/view/f32/F32Mat4.java + hat/examples/view/src/main/java/view/f32/F32Mesh3D.java + hat/examples/view/src/main/java/view/f32/F32Triangle3D.java + hat/examples/view/src/main/java/view/f32/F32Vec3.java + hat/examples/view/src/main/java/view/f32/mat4.java + hat/examples/view/src/main/java/view/f32/projectionMat4.java + hat/examples/view/src/main/java/view/f32/rotationMat4.java + hat/examples/view/src/main/java/view/f32/scaleMat4.java + hat/examples/view/src/main/java/view/f32/translateMat4.java + hat/examples/view/src/main/java/view/f32/tri.java + hat/examples/view/src/main/java/view/f32/vec3.java + hat/examples/view/src/main/java/view/i32/I32Line2D.java + hat/examples/view/src/main/java/view/i32/I32Triangle2D.java + hat/examples/view/src/main/java/view/i32/I32Vec2.java + hat/examples/view/src/main/resources/meshes/Elite.txt ! hat/hat.java ! hat/intellij/.idea/modules.xml From gfrost at openjdk.org Thu Oct 23 09:45:16 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 09:45:16 GMT Subject: [code-reflection] Integrated: Added non-hatified view 3d perspective example Message-ID: I have had this code for a few years. Was waiting for HAT to get vector support. I think its time to add as an example. java @hat/bld java @hat/run ffi-opencl view For UK men/women of a certain age java @hat/run ffi-opencl view BOA ------------- Commit messages: - Added non-hatified view 3d perspective example Changes: https://git.openjdk.org/babylon/pull/632/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=632&range=00 Stats: 4145 lines in 27 files changed: 4145 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/632.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/632/head:pull/632 PR: https://git.openjdk.org/babylon/pull/632 From gfrost at openjdk.org Thu Oct 23 09:45:16 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 09:45:16 GMT Subject: [code-reflection] Integrated: Added non-hatified view 3d perspective example In-Reply-To: References: Message-ID: On Thu, 23 Oct 2025 09:36:57 GMT, Gary Frost wrote: > I have had this code for a few years. Was waiting for HAT to get vector support. > > I think its time to add as an example. > > > java @hat/bld > java @hat/run ffi-opencl view > > > For UK men/women of a certain age > > java @hat/run ffi-opencl view BOA This pull request has now been integrated. Changeset: adcb1ea0 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/adcb1ea06f5a2c0b04e2d944b59e4da1e8226d71 Stats: 4145 lines in 27 files changed: 4145 ins; 0 del; 0 mod Added non-hatified view 3d perspective example ------------- PR: https://git.openjdk.org/babylon/pull/632 From gfrost at openjdk.org Thu Oct 23 10:34:34 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 10:34:34 GMT Subject: git: openjdk/babylon: code-reflection: Allow arbritrary text to be injected using annotations Message-ID: Changeset: 5fa15c4c Branch: code-reflection Author: Gary Frost Date: 2025-10-23 10:33:06 +0000 URL: https://git.openjdk.org/babylon/commit/5fa15c4c70ba7a17df306b81875dfddc596eaae6 Allow arbritrary text to be injected using annotations ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java = hat/core/src/main/java/hat/annotations/Preformatted.java ! hat/core/src/main/java/hat/annotations/TypeDef.java ! hat/examples/experiments/src/main/java/experiments/PrefixSum.java From gfrost at openjdk.org Thu Oct 23 10:36:10 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 10:36:10 GMT Subject: [code-reflection] Integrated: Allow arbritrary text to be injected using annotations Message-ID: We previously allow typdefs and kernel bodies to be injected using annotations on kernels> Sometimes we want to inject arbitrary chunks of code. We can do this with `@Preformatted(" //My text")` ------------- Commit messages: - Allow arbritrary text to be injected using annotations Changes: https://git.openjdk.org/babylon/pull/633/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=633&range=00 Stats: 21 lines in 4 files changed: 12 ins; 2 del; 7 mod Patch: https://git.openjdk.org/babylon/pull/633.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/633/head:pull/633 PR: https://git.openjdk.org/babylon/pull/633 From gfrost at openjdk.org Thu Oct 23 10:36:11 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 10:36:11 GMT Subject: [code-reflection] Integrated: Allow arbritrary text to be injected using annotations In-Reply-To: References: Message-ID: On Thu, 23 Oct 2025 10:29:29 GMT, Gary Frost wrote: > We previously allow typdefs and kernel bodies to be injected using annotations on kernels> > > Sometimes we want to inject arbitrary chunks of code. > > We can do this with `@Preformatted(" //My text")` This pull request has now been integrated. Changeset: 5fa15c4c Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/5fa15c4c70ba7a17df306b81875dfddc596eaae6 Stats: 21 lines in 4 files changed: 12 ins; 2 del; 7 mod Allow arbritrary text to be injected using annotations ------------- PR: https://git.openjdk.org/babylon/pull/633 From duke at openjdk.org Thu Oct 23 12:35:12 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 23 Oct 2025 12:35:12 GMT Subject: [code-reflection] RFR: Update jdk version in opgen project Message-ID: This PR fixes the JDK version in `opgen` project. As Babylon is based now on JDK 26, the project setup should be based on JDK 26. In a terminal window, running `mvn clean verify` from `cr-examples/onnx/pom.xml` failed with [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure [ERROR] invalid source release 25 with --enable-preview [ERROR] (preview language features are only supported for release 26) ------------- Commit messages: - Update jdk version in opgen project. Changes: https://git.openjdk.org/babylon/pull/634/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=634&range=00 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/634.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/634/head:pull/634 PR: https://git.openjdk.org/babylon/pull/634 From duke at openjdk.org Thu Oct 23 12:44:19 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 23 Oct 2025 12:44:19 GMT Subject: [code-reflection] RFR: Update jdk version in opgen project [v2] In-Reply-To: References: Message-ID: > This PR fixes the JDK version in `opgen` project. > As Babylon is based now on JDK 26, the project setup should be based on JDK 26. > > In a terminal window, running `mvn clean verify` from `cr-examples/onnx/pom.xml` failed with > > > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure > [ERROR] invalid source release 25 with --enable-preview > [ERROR] (preview language features are only supported for release 26) Ana Maria Mihalceanu has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: Allow arbritrary text to be injected using annotations ------------- Changes: https://git.openjdk.org/babylon/pull/634/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=634&range=01 Stats: 23 lines in 5 files changed: 12 ins; 2 del; 9 mod Patch: https://git.openjdk.org/babylon/pull/634.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/634/head:pull/634 PR: https://git.openjdk.org/babylon/pull/634 From duke at openjdk.org Thu Oct 23 12:44:21 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 23 Oct 2025 12:44:21 GMT Subject: [code-reflection] Withdrawn: Update jdk version in opgen project In-Reply-To: References: Message-ID: On Thu, 23 Oct 2025 12:28:50 GMT, Ana Maria Mihalceanu wrote: > This PR fixes the JDK version in `opgen` project. > As Babylon is based now on JDK 26, the project setup should be based on JDK 26. > > In a terminal window, running `mvn clean verify` from `cr-examples/onnx/pom.xml` failed with > > > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure > [ERROR] invalid source release 25 with --enable-preview > [ERROR] (preview language features are only supported for release 26) This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/babylon/pull/634 From duke at openjdk.org Thu Oct 23 12:53:38 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 23 Oct 2025 12:53:38 GMT Subject: [code-reflection] RFR: Update JDK version in opgen project Message-ID: This PR fixes the JDK version in `opgen` project. As Babylon is based now on JDK 26, the project setup should be based on JDK 26. In a terminal window, running `mvn clean verify` from `cr-examples/onnx/pom.xml` failed with [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure [ERROR] invalid source release 25 with --enable-preview [ERROR] (preview language features are only supported for release 26) ------------- Commit messages: - Update jdk version in opgen project. Changes: https://git.openjdk.org/babylon/pull/635/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=635&range=00 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/635.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/635/head:pull/635 PR: https://git.openjdk.org/babylon/pull/635 From duke at openjdk.org Thu Oct 23 12:58:49 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 23 Oct 2025 12:58:49 GMT Subject: [code-reflection] RFR: Update JDK version in opgen project [v2] In-Reply-To: References: Message-ID: > This PR fixes the JDK version in `opgen` project. > As Babylon is based now on JDK 26, the project setup should be based on JDK 26. > > In a terminal window, running `mvn clean verify` from `cr-examples/onnx/pom.xml` failed with > > > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure > [ERROR] invalid source release 25 with --enable-preview > [ERROR] (preview language features are only supported for release 26) Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Update full name ------------- Changes: - all: https://git.openjdk.org/babylon/pull/635/files - new: https://git.openjdk.org/babylon/pull/635/files/f8ca1dc6..3c3e93fa Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=635&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=635&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/635.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/635/head:pull/635 PR: https://git.openjdk.org/babylon/pull/635 From duke at openjdk.org Thu Oct 23 13:07:34 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 23 Oct 2025 13:07:34 GMT Subject: [code-reflection] RFR: Update JDK version in opgen project [v3] In-Reply-To: References: Message-ID: <33HEZArwzz3WdyArUUvMYNcqD6H60lLUXcMyiFda4Pk=.dd7c74ad-cf8f-4676-a7c4-0cb946669496@github.com> > This PR fixes the JDK version in `opgen` project. > It also removes a duplicate branch in a `switch` of `OnnxProtoBuilder.java`. > > As Babylon is based now on JDK 26, the project setup should be based on JDK 26. > In a terminal window, running `mvn clean verify` from `cr-examples/onnx/opgen/pom.xml` failed with > > > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure > [ERROR] invalid source release 25 with --enable-preview > [ERROR] (preview language features are only supported for release 26) Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Fix switch compilation error after merge. Signed-off-by: ammbra ------------- Changes: - all: https://git.openjdk.org/babylon/pull/635/files - new: https://git.openjdk.org/babylon/pull/635/files/3c3e93fa..30c70097 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=635&range=02 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=635&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/635.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/635/head:pull/635 PR: https://git.openjdk.org/babylon/pull/635 From gfrost at openjdk.org Thu Oct 23 14:38:58 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 14:38:58 GMT Subject: git: openjdk/babylon: code-reflection: Simplify parsing of view data Message-ID: <183d2c09-87ab-4cb8-9722-e250dd5f87c2@openjdk.org> Changeset: ae7306c7 Branch: code-reflection Author: Gary Frost Date: 2025-10-23 14:36:05 +0000 URL: https://git.openjdk.org/babylon/commit/ae7306c7426311e9583a366f8467ba5f05a3a384 Simplify parsing of view data ! hat/examples/view/src/main/java/view/EliteMeshReader.java ! hat/examples/view/src/main/java/view/Main.java + hat/examples/view/src/main/java/view/Regex.java + hat/intellij/example_view.iml From gfrost at openjdk.org Thu Oct 23 14:39:46 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 14:39:46 GMT Subject: [code-reflection] Integrated: Simplify parsing of view data In-Reply-To: <5Y5hlQz_g6n3ysbzRO3JbqzXwCRoHV_-WbF3_DwzajQ=.80ff86fd-b4c6-45dc-a514-f386a92872ed@github.com> References: <5Y5hlQz_g6n3ysbzRO3JbqzXwCRoHV_-WbF3_DwzajQ=.80ff86fd-b4c6-45dc-a514-f386a92872ed@github.com> Message-ID: On Thu, 23 Oct 2025 14:31:44 GMT, Gary Frost wrote: > Added example-view .iml file > > Also simplified parsing of meshes. This pull request has now been integrated. Changeset: ae7306c7 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/ae7306c7426311e9583a366f8467ba5f05a3a384 Stats: 224 lines in 4 files changed: 106 ins; 64 del; 54 mod Simplify parsing of view data ------------- PR: https://git.openjdk.org/babylon/pull/636 From gfrost at openjdk.org Thu Oct 23 14:39:45 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 23 Oct 2025 14:39:45 GMT Subject: [code-reflection] Integrated: Simplify parsing of view data Message-ID: <5Y5hlQz_g6n3ysbzRO3JbqzXwCRoHV_-WbF3_DwzajQ=.80ff86fd-b4c6-45dc-a514-f386a92872ed@github.com> Added example-view .iml file Also simplified parsing of meshes. ------------- Commit messages: - Simplify parsing of view data Changes: https://git.openjdk.org/babylon/pull/636/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=636&range=00 Stats: 224 lines in 4 files changed: 106 ins; 64 del; 54 mod Patch: https://git.openjdk.org/babylon/pull/636.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/636/head:pull/636 PR: https://git.openjdk.org/babylon/pull/636 From duke at openjdk.org Thu Oct 23 15:21:13 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 23 Oct 2025 15:21:13 GMT Subject: [code-reflection] Integrated: Update JDK version in opgen project In-Reply-To: References: Message-ID: On Thu, 23 Oct 2025 12:47:03 GMT, Ana Maria Mihalceanu wrote: > This PR fixes the JDK version in `opgen` project. > It also removes a duplicate branch in a `switch` of `OnnxProtoBuilder.java`. > > As Babylon is based now on JDK 26, the project setup should be based on JDK 26. > In a terminal window, running `mvn clean verify` from `cr-examples/onnx/opgen/pom.xml` failed with > > > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure > [ERROR] invalid source release 25 with --enable-preview > [ERROR] (preview language features are only supported for release 26) This pull request has now been integrated. Changeset: cbc0ed44 Author: ammbra Committer: Adam Sotona URL: https://git.openjdk.org/babylon/commit/cbc0ed446c7eb669b051e2aa4bb9dfc88c612606 Stats: 6 lines in 2 files changed: 0 ins; 4 del; 2 mod Update JDK version in opgen project Reviewed-by: asotona ------------- PR: https://git.openjdk.org/babylon/pull/635 From asotona at openjdk.org Thu Oct 23 15:22:22 2025 From: asotona at openjdk.org (Adam Sotona) Date: Thu, 23 Oct 2025 15:22:22 GMT Subject: git: openjdk/babylon: code-reflection: Update JDK version in opgen project Message-ID: Changeset: cbc0ed44 Branch: code-reflection Author: ammbra Committer: Adam Sotona Date: 2025-10-23 15:18:32 +0000 URL: https://git.openjdk.org/babylon/commit/cbc0ed446c7eb669b051e2aa4bb9dfc88c612606 Update JDK version in opgen project Reviewed-by: asotona ! cr-examples/onnx/opgen/pom.xml ! cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxProtoBuilder.java From asotona at openjdk.org Thu Oct 23 15:10:38 2025 From: asotona at openjdk.org (Adam Sotona) Date: Thu, 23 Oct 2025 15:10:38 GMT Subject: [code-reflection] RFR: Update JDK version in opgen project [v3] In-Reply-To: <33HEZArwzz3WdyArUUvMYNcqD6H60lLUXcMyiFda4Pk=.dd7c74ad-cf8f-4676-a7c4-0cb946669496@github.com> References: <33HEZArwzz3WdyArUUvMYNcqD6H60lLUXcMyiFda4Pk=.dd7c74ad-cf8f-4676-a7c4-0cb946669496@github.com> Message-ID: On Thu, 23 Oct 2025 13:07:34 GMT, Ana Maria Mihalceanu wrote: >> This PR fixes the JDK version in `opgen` project. >> It also removes a duplicate branch in a `switch` of `OnnxProtoBuilder.java`. >> >> As Babylon is based now on JDK 26, the project setup should be based on JDK 26. >> In a terminal window, running `mvn clean verify` from `cr-examples/onnx/opgen/pom.xml` failed with >> >> >> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure >> [ERROR] invalid source release 25 with --enable-preview >> [ERROR] (preview language features are only supported for release 26) > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Fix switch compilation error after merge. > > Signed-off-by: ammbra Looks good to me. ------------- Marked as reviewed by asotona (Reviewer). PR Review: https://git.openjdk.org/babylon/pull/635#pullrequestreview-3370486768 From duke at openjdk.org Thu Oct 23 15:14:47 2025 From: duke at openjdk.org (duke) Date: Thu, 23 Oct 2025 15:14:47 GMT Subject: [code-reflection] RFR: Update JDK version in opgen project [v3] In-Reply-To: <33HEZArwzz3WdyArUUvMYNcqD6H60lLUXcMyiFda4Pk=.dd7c74ad-cf8f-4676-a7c4-0cb946669496@github.com> References: <33HEZArwzz3WdyArUUvMYNcqD6H60lLUXcMyiFda4Pk=.dd7c74ad-cf8f-4676-a7c4-0cb946669496@github.com> Message-ID: On Thu, 23 Oct 2025 13:07:34 GMT, Ana Maria Mihalceanu wrote: >> This PR fixes the JDK version in `opgen` project. >> It also removes a duplicate branch in a `switch` of `OnnxProtoBuilder.java`. >> >> As Babylon is based now on JDK 26, the project setup should be based on JDK 26. >> In a terminal window, running `mvn clean verify` from `cr-examples/onnx/opgen/pom.xml` failed with >> >> >> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project onnx-opgen: Compilation failure >> [ERROR] invalid source release 25 with --enable-preview >> [ERROR] (preview language features are only supported for release 26) > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Fix switch compilation error after merge. > > Signed-off-by: ammbra @ammbra Your change (at version 30c70097da04f3cefa190f49ee65f6cc22c4c17b) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/babylon/pull/635#issuecomment-3437552378 From duke at openjdk.org Fri Oct 24 06:16:37 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 24 Oct 2025 06:16:37 GMT Subject: [code-reflection] Withdrawn: Add kernel entrypoint to ModuleOp In-Reply-To: References: Message-ID: On Tue, 7 Oct 2025 21:45:20 GMT, Ruby Chen wrote: > Include the kernel (and compute) entrypoints in their respective ModuleOps. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/babylon/pull/605 From duke at openjdk.org Fri Oct 24 06:18:37 2025 From: duke at openjdk.org (duke) Date: Fri, 24 Oct 2025 06:18:37 GMT Subject: [code-reflection] RFR: Update buffer tagging with arrayview support [v2] In-Reply-To: <1jdULGHfHB4nCUXUpVPryHcmGqIfOoAX82UivLaw8gc=.2010ead2-2d31-4acd-9aa7-338abe739c73@github.com> References: <1jdULGHfHB4nCUXUpVPryHcmGqIfOoAX82UivLaw8gc=.2010ead2-2d31-4acd-9aa7-338abe739c73@github.com> Message-ID: On Fri, 17 Oct 2025 17:10:22 GMT, Ruby Chen wrote: >> Add buffer tagging for array views, and also use `elements()` instead of `traverse()`. > > Ruby Chen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Merge branch 'code-reflection' into module-op-support > - Update buffer tagging with arrayview support @rbrchen Your change (at version bc4776b4d2b1ec838bfcbd26c87c1af7adfed5d3) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/babylon/pull/610#issuecomment-3441251195 From jfumero at openjdk.org Fri Oct 24 08:56:57 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 08:56:57 GMT Subject: [code-reflection] RFR: [hat] TestMul 1D thread-block and test f16 improved Message-ID: <3CtT0RmoDCipCTlwM_7moBy1r4CrFnRYrHZ2nLTd4B4=.f3bb5553-bf14-4c9c-b9f0-c6be4a2371f5@github.com> TestMul 1D thread-block and test f16 improved ------------- Commit messages: - [hat] TestMul 1D thread-block and test f16 improved Changes: https://git.openjdk.org/babylon/pull/637/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=637&range=00 Stats: 21 lines in 3 files changed: 9 ins; 7 del; 5 mod Patch: https://git.openjdk.org/babylon/pull/637.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/637/head:pull/637 PR: https://git.openjdk.org/babylon/pull/637 From asotona at openjdk.org Fri Oct 24 09:24:50 2025 From: asotona at openjdk.org (Adam Sotona) Date: Fri, 24 Oct 2025 09:24:50 GMT Subject: [code-reflection] RFR: OnnxLift prototype Message-ID: This is a prototype of OnnxLift tool. It lifts ONNX model binary to ONNX code reflection model, extracts weights, and generates Java model source. ------------- Commit messages: - OnnxLift prototype Changes: https://git.openjdk.org/babylon/pull/638/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=00 Stats: 729 lines in 3 files changed: 727 ins; 1 del; 1 mod Patch: https://git.openjdk.org/babylon/pull/638.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/638/head:pull/638 PR: https://git.openjdk.org/babylon/pull/638 From jfumero at openjdk.org Fri Oct 24 10:17:14 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 10:17:14 GMT Subject: [code-reflection] Integrated: [hat] TestMul 1D thread-block and test f16 improved In-Reply-To: <3CtT0RmoDCipCTlwM_7moBy1r4CrFnRYrHZ2nLTd4B4=.f3bb5553-bf14-4c9c-b9f0-c6be4a2371f5@github.com> References: <3CtT0RmoDCipCTlwM_7moBy1r4CrFnRYrHZ2nLTd4B4=.f3bb5553-bf14-4c9c-b9f0-c6be4a2371f5@github.com> Message-ID: On Fri, 24 Oct 2025 08:51:34 GMT, Juan Fumero wrote: > TestMul 1D thread-block and test f16 improved This pull request has now been integrated. Changeset: 66109287 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/66109287d4fbb21622b13bc9ba2293d512000e80 Stats: 21 lines in 3 files changed: 9 ins; 7 del; 5 mod [hat] TestMul 1D thread-block and test f16 improved ------------- PR: https://git.openjdk.org/babylon/pull/637 From jfumero at openjdk.org Fri Oct 24 10:19:56 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 10:19:56 GMT Subject: git: openjdk/babylon: code-reflection: [hat] TestMul 1D thread-block and test f16 improved Message-ID: <21834153-8fb6-46c6-ba71-0108fa5eba18@openjdk.org> Changeset: 66109287 Branch: code-reflection Author: Juan Fumero Date: 2025-10-24 10:14:25 +0000 URL: https://git.openjdk.org/babylon/commit/66109287d4fbb21622b13bc9ba2293d512000e80 [hat] TestMul 1D thread-block and test f16 improved ! hat/examples/matmul/src/main/java/matmul/Main.java ! hat/tests/src/main/java/hat/test/TestF16Type.java ! hat/tests/src/main/java/hat/test/TestMatMul.java From jfumero at openjdk.org Fri Oct 24 10:31:02 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 10:31:02 GMT Subject: [code-reflection] RFR: [hat] Enable PROFILE_CUDA_KERNEL option Message-ID: This PR adds a new option to profiler CUDA kernels (`PROFILE_CUDA_KERNEL`). How to use it? HAT=PROFILE_CUDA_KERNEL java -cp hat/job.jar hat.java run ffi-cuda .... ------------- Commit messages: - [hat] Enable PROFILE_CUDA_KERNEL option Changes: https://git.openjdk.org/babylon/pull/639/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=639&range=00 Stats: 48 lines in 4 files changed: 30 ins; 2 del; 16 mod Patch: https://git.openjdk.org/babylon/pull/639.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/639/head:pull/639 PR: https://git.openjdk.org/babylon/pull/639 From jfumero at openjdk.org Fri Oct 24 10:38:31 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 10:38:31 GMT Subject: [code-reflection] Integrated: [hat] Enable PROFILE_CUDA_KERNEL option In-Reply-To: References: Message-ID: <_1xzpR6jUlh2WFoxc15H916P93RFxwdke2Uioi-XGpo=.7fba1981-3d0d-4a34-8274-d16ac96c40fe@github.com> On Fri, 24 Oct 2025 10:24:59 GMT, Juan Fumero wrote: > This PR adds a new option to profiler CUDA kernels (`PROFILE_CUDA_KERNEL`). > > How to use it? > > > HAT=PROFILE_CUDA_KERNEL java -cp hat/job.jar hat.java run ffi-cuda .... This pull request has now been integrated. Changeset: 70545418 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/70545418e164ff9c6acbe95317ff5649c996400f Stats: 48 lines in 4 files changed: 30 ins; 2 del; 16 mod [hat] Enable PROFILE_CUDA_KERNEL option ------------- PR: https://git.openjdk.org/babylon/pull/639 From jfumero at openjdk.org Fri Oct 24 10:37:34 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 10:37:34 GMT Subject: git: openjdk/babylon: code-reflection: [hat] Enable PROFILE_CUDA_KERNEL option Message-ID: <7fd4ee5f-bc7d-454b-af50-c5efe78fa408@openjdk.org> Changeset: 70545418 Branch: code-reflection Author: Juan Fumero Date: 2025-10-24 10:35:12 +0000 URL: https://git.openjdk.org/babylon/commit/70545418e164ff9c6acbe95317ff5649c996400f [hat] Enable PROFILE_CUDA_KERNEL option ! hat/backends/ffi/cuda/src/main/native/cpp/cuda_backend.cpp ! hat/backends/ffi/cuda/src/main/native/include/cuda_backend.h ! hat/backends/ffi/shared/src/main/native/include/config.h ! hat/core/src/main/java/hat/Config.java From jfumero at openjdk.org Fri Oct 24 11:43:52 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 11:43:52 GMT Subject: [code-reflection] Integrated: [hat] config.h in sync with the auto-generator Message-ID: `config.h` in sync using the `hat.FFIConfigCreator` ------------- Commit messages: - [hat] config.h in sync with the auto-generator Changes: https://git.openjdk.org/babylon/pull/640/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=640&range=00 Stats: 5 lines in 1 file changed: 2 ins; 1 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/640.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/640/head:pull/640 PR: https://git.openjdk.org/babylon/pull/640 From jfumero at openjdk.org Fri Oct 24 11:43:53 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 11:43:53 GMT Subject: [code-reflection] Integrated: [hat] config.h in sync with the auto-generator In-Reply-To: References: Message-ID: On Fri, 24 Oct 2025 11:30:43 GMT, Juan Fumero wrote: > `config.h` in sync using the `hat.FFIConfigCreator` This pull request has now been integrated. Changeset: e0fe71a4 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/e0fe71a411d7036aea23e97abfb24b28f405d922 Stats: 5 lines in 1 file changed: 2 ins; 1 del; 2 mod [hat] config.h in sync with the auto-generator ------------- PR: https://git.openjdk.org/babylon/pull/640 From jfumero at openjdk.org Fri Oct 24 11:44:17 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 24 Oct 2025 11:44:17 GMT Subject: git: openjdk/babylon: code-reflection: [hat] config.h in sync with the auto-generator Message-ID: Changeset: e0fe71a4 Branch: code-reflection Author: Juan Fumero Date: 2025-10-24 11:40:40 +0000 URL: https://git.openjdk.org/babylon/commit/e0fe71a411d7036aea23e97abfb24b28f405d922 [hat] config.h in sync with the auto-generator ! hat/backends/ffi/shared/src/main/native/include/config.h From duke at openjdk.org Fri Oct 24 11:58:36 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 24 Oct 2025 11:58:36 GMT Subject: [code-reflection] Integrated: Update buffer tagging with arrayview support In-Reply-To: References: Message-ID: On Wed, 15 Oct 2025 18:50:16 GMT, Ruby Chen wrote: > Add buffer tagging for array views, and also use `elements()` instead of `traverse()`. This pull request has now been integrated. Changeset: 255b62fb Author: Ruby Chen Committer: Gary Frost URL: https://git.openjdk.org/babylon/commit/255b62fb74a18c2a79abef31f2051909dee1cbac Stats: 39 lines in 2 files changed: 17 ins; 3 del; 19 mod Update buffer tagging with arrayview support ------------- PR: https://git.openjdk.org/babylon/pull/610 From gfrost at openjdk.org Fri Oct 24 12:02:45 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 24 Oct 2025 12:02:45 GMT Subject: git: openjdk/babylon: code-reflection: Update buffer tagging with arrayview support Message-ID: Changeset: 255b62fb Branch: code-reflection Author: Ruby Chen Committer: Gary Frost Date: 2025-10-24 11:56:08 +0000 URL: https://git.openjdk.org/babylon/commit/255b62fb74a18c2a79abef31f2051909dee1cbac Update buffer tagging with arrayview support ! hat/core/src/main/java/hat/BufferTagger.java ! hat/examples/arrayview/src/main/java/arrayview/Main.java From asotona at openjdk.org Fri Oct 24 13:44:05 2025 From: asotona at openjdk.org (Adam Sotona) Date: Fri, 24 Oct 2025 13:44:05 GMT Subject: [code-reflection] RFR: OnnxLift prototype [v2] In-Reply-To: References: Message-ID: > This is a prototype of OnnxLift tool. > It lifts ONNX model binary to ONNX code reflection model, extracts weights, and generates Java model source. Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: missing annotation ------------- Changes: - all: https://git.openjdk.org/babylon/pull/638/files - new: https://git.openjdk.org/babylon/pull/638/files/43bb1088..003e0d5d Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=00-01 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/638.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/638/head:pull/638 PR: https://git.openjdk.org/babylon/pull/638 From gfrost at openjdk.org Fri Oct 24 15:30:34 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 24 Oct 2025 15:30:34 GMT Subject: git: openjdk/babylon: code-reflection: Hat util regex Message-ID: <832f5cc1-4b6f-4e86-84e0-f98716f77626@openjdk.org> Changeset: 801d7368 Branch: code-reflection Author: Gary Frost Date: 2025-10-24 15:28:45 +0000 URL: https://git.openjdk.org/babylon/commit/801d7368218e6e17c072c64c31da4a17ae3210dc Hat util regex + hat/core/src/main/java/hat/util/Regex.java ! hat/core/src/main/java/hat/util/StreamMutable.java ! hat/examples/experiments/src/main/java/experiments/PrefixSum.java ! hat/examples/view/src/main/java/view/EliteMeshReader.java ! hat/examples/view/src/main/java/view/Main.java - hat/examples/view/src/main/java/view/Regex.java + hat/hat/ffisync From gfrost at openjdk.org Fri Oct 24 15:31:38 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 24 Oct 2025 15:31:38 GMT Subject: [code-reflection] Integrated: Hat util regex Message-ID: Added a wrapper around java Pattern regex matcher which is easier to use (instanceof patterns) Result of matcher generates distict classes (FAIL vs PASS) so we can pattren switch more easily. Also added hat/ffisync ------------- Commit messages: - Add hat.util.Regex and hat/ffisync - Add hat.util.Regex and hat/ffisync Changes: https://git.openjdk.org/babylon/pull/641/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=641&range=00 Stats: 309 lines in 7 files changed: 153 ins; 115 del; 41 mod Patch: https://git.openjdk.org/babylon/pull/641.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/641/head:pull/641 PR: https://git.openjdk.org/babylon/pull/641 From gfrost at openjdk.org Fri Oct 24 15:31:39 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 24 Oct 2025 15:31:39 GMT Subject: [code-reflection] Integrated: Hat util regex In-Reply-To: References: Message-ID: <9o2NXfH5Ubiotk0fJtTD6i7QY2D9Y04P_9SAAct_3k8=.afb352d6-ea21-4657-8672-1e2d20e80d18@github.com> On Fri, 24 Oct 2025 15:25:23 GMT, Gary Frost wrote: > Added a wrapper around java Pattern regex matcher which is easier to use (instanceof patterns) > > Result of matcher generates distict classes (FAIL vs PASS) so we can pattren switch more easily. > > Also added hat/ffisync This pull request has now been integrated. Changeset: 801d7368 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/801d7368218e6e17c072c64c31da4a17ae3210dc Stats: 309 lines in 7 files changed: 153 ins; 115 del; 41 mod Hat util regex ------------- PR: https://git.openjdk.org/babylon/pull/641 From gfrost at openjdk.org Fri Oct 24 17:22:17 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 24 Oct 2025 17:22:17 GMT Subject: [code-reflection] Integrated: Coverted enum base view parser to iface based Message-ID: Simplified view parser. Also increased number of vertices in view demo ------------- Commit messages: - Coverted enum base view parser to iface based Changes: https://git.openjdk.org/babylon/pull/643/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=643&range=00 Stats: 74 lines in 6 files changed: 20 ins; 21 del; 33 mod Patch: https://git.openjdk.org/babylon/pull/643.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/643/head:pull/643 PR: https://git.openjdk.org/babylon/pull/643 From gfrost at openjdk.org Fri Oct 24 17:22:22 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 24 Oct 2025 17:22:22 GMT Subject: git: openjdk/babylon: code-reflection: Coverted enum base view parser to iface based Message-ID: <30e349fa-8aca-444a-b04f-4fd44f7dea63@openjdk.org> Changeset: 873d7965 Branch: code-reflection Author: Gary Frost Date: 2025-10-24 17:18:19 +0000 URL: https://git.openjdk.org/babylon/commit/873d79657c907cdd7993dd226f87e150444c06b3 Coverted enum base view parser to iface based ! hat/examples/view/src/main/java/view/EliteMeshReader.java ! hat/examples/view/src/main/java/view/Main.java ! hat/examples/view/src/main/java/view/f32/F32Triangle3D.java ! hat/examples/view/src/main/java/view/f32/F32Vec3.java ! hat/examples/view/src/main/java/view/i32/I32Triangle2D.java ! hat/examples/view/src/main/java/view/i32/I32Vec2.java From gfrost at openjdk.org Fri Oct 24 17:22:17 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 24 Oct 2025 17:22:17 GMT Subject: [code-reflection] Integrated: Coverted enum base view parser to iface based In-Reply-To: References: Message-ID: On Fri, 24 Oct 2025 16:58:38 GMT, Gary Frost wrote: > Simplified view parser. > > Also increased number of vertices in view demo This pull request has now been integrated. Changeset: 873d7965 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/873d79657c907cdd7993dd226f87e150444c06b3 Stats: 74 lines in 6 files changed: 20 ins; 21 del; 33 mod Coverted enum base view parser to iface based ------------- PR: https://git.openjdk.org/babylon/pull/643 From jfumero at openjdk.org Mon Oct 27 10:10:18 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 27 Oct 2025 10:10:18 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code Message-ID: This PR adds support for creating float4 objects within the device code: Float4 f = Float4.of(x, y, z ,w) In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: Float4 vA ... Float4 vB ... vA.linewise(vB, (a, b) -> Float::sum); ------------- Commit messages: - [hat] minor change - [hat] makeFloat4 from immutable supported on GPU - [hat][wip] float4 implementation with mutable/immutable variants - [hat] Float4 views docs - Merge branch 'code-reflection' into hat/float4/of - [hat] CUDA backend Float4.of supported - [hat] fix dialectify Float.of phase - [hat] Float4.of supported for OpenCL Changes: https://git.openjdk.org/babylon/pull/642/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=00 Stats: 604 lines in 26 files changed: 525 ins; 15 del; 64 mod Patch: https://git.openjdk.org/babylon/pull/642.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642 PR: https://git.openjdk.org/babylon/pull/642 From jfumero at openjdk.org Mon Oct 27 10:36:00 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 27 Oct 2025 10:36:00 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v2] In-Reply-To: References: Message-ID: > This PR adds support for creating float4 objects within the device code: > > > Float4 f = Float4.of(x, y, z ,w) > > > In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: > > > Float4 vA ... > Float4 vB ... > vA.linewise(vB, (a, b) -> Float::sum); Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] Move vectorOf codegen method to common C99 codegen ------------- Changes: - all: https://git.openjdk.org/babylon/pull/642/files - new: https://git.openjdk.org/babylon/pull/642/files/31e0db21..2f954e0b Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=00-01 Stats: 80 lines in 4 files changed: 24 ins; 50 del; 6 mod Patch: https://git.openjdk.org/babylon/pull/642.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642 PR: https://git.openjdk.org/babylon/pull/642 From jfumero at openjdk.org Mon Oct 27 10:39:35 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 27 Oct 2025 10:39:35 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v3] In-Reply-To: References: Message-ID: <0I0b7tFu9M8W_Q2Vk1yBKYXYp6yeS_U8G-jQjJSLiPs=.3a185c30-c0a3-49e2-89be-e14d4ed7fb83@github.com> > This PR adds support for creating float4 objects within the device code: > > > Float4 f = Float4.of(x, y, z ,w) > > > In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: > > > Float4 vA ... > Float4 vB ... > vA.linewise(vB, (a, b) -> Float::sum); Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] codegen - cleanup old OpenCL typecasts ------------- Changes: - all: https://git.openjdk.org/babylon/pull/642/files - new: https://git.openjdk.org/babylon/pull/642/files/2f954e0b..e9864a77 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=02 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=01-02 Stats: 5 lines in 2 files changed: 0 ins; 5 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/642.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642 PR: https://git.openjdk.org/babylon/pull/642 From jfumero at openjdk.org Mon Oct 27 11:17:30 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 27 Oct 2025 11:17:30 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v4] In-Reply-To: References: Message-ID: > This PR adds support for creating float4 objects within the device code: > > > Float4 f = Float4.of(x, y, z ,w) > > > In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: > > > Float4 vA ... > Float4 vB ... > vA.linewise(vB, (a, b) -> Float::sum); Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] minor refactor ocl-codegen ------------- Changes: - all: https://git.openjdk.org/babylon/pull/642/files - new: https://git.openjdk.org/babylon/pull/642/files/e9864a77..fd9c6d3c Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=03 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=02-03 Stats: 11 lines in 4 files changed: 7 ins; 2 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/642.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642 PR: https://git.openjdk.org/babylon/pull/642 From jfumero at openjdk.org Mon Oct 27 11:38:56 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 27 Oct 2025 11:38:56 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v5] In-Reply-To: References: Message-ID: > This PR adds support for creating float4 objects within the device code: > > > Float4 f = Float4.of(x, y, z ,w) > > > In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: > > > Float4 vA ... > Float4 vB ... > vA.linewise(vB, (a, b) -> Float::sum); Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] Dialect for handling vector types simplified ------------- Changes: - all: https://git.openjdk.org/babylon/pull/642/files - new: https://git.openjdk.org/babylon/pull/642/files/fd9c6d3c..3c45324c Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=04 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=03-04 Stats: 109 lines in 12 files changed: 23 ins; 69 del; 17 mod Patch: https://git.openjdk.org/babylon/pull/642.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642 PR: https://git.openjdk.org/babylon/pull/642 From jfumero at openjdk.org Mon Oct 27 12:07:16 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 27 Oct 2025 12:07:16 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v6] In-Reply-To: References: Message-ID: <8kf36Fz0oyJOMfXQ9pPUpHdvgG9WtDy0V5vZCM-NHXE=.7ad01b44-d0ef-4fc3-96e9-772bfcb27062@github.com> > This PR adds support for creating float4 objects within the device code: > > > Float4 f = Float4.of(x, y, z ,w) > > > In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: > > > Float4 vA ... > Float4 vB ... > vA.linewise(vB, (a, b) -> Float::sum); Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] Log Config bits for OpenCL moved to OpenCL backend instantiation ------------- Changes: - all: https://git.openjdk.org/babylon/pull/642/files - new: https://git.openjdk.org/babylon/pull/642/files/3c45324c..251f1a52 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=05 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=04-05 Stats: 9 lines in 1 file changed: 5 ins; 4 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/642.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642 PR: https://git.openjdk.org/babylon/pull/642 From asotona at openjdk.org Mon Oct 27 16:19:16 2025 From: asotona at openjdk.org (Adam Sotona) Date: Mon, 27 Oct 2025 16:19:16 GMT Subject: [code-reflection] RFR: OnnxLift prototype [v3] In-Reply-To: References: Message-ID: > This is a prototype of OnnxLift tool. > It lifts ONNX model binary to ONNX code reflection model, extracts weights, and generates Java model source. Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: refactoring split to JavaTemplate ------------- Changes: - all: https://git.openjdk.org/babylon/pull/638/files - new: https://git.openjdk.org/babylon/pull/638/files/003e0d5d..4aa3ce64 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=02 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=01-02 Stats: 718 lines in 2 files changed: 381 ins; 323 del; 14 mod Patch: https://git.openjdk.org/babylon/pull/638.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/638/head:pull/638 PR: https://git.openjdk.org/babylon/pull/638 From asotona at openjdk.org Mon Oct 27 16:27:26 2025 From: asotona at openjdk.org (Adam Sotona) Date: Mon, 27 Oct 2025 16:27:26 GMT Subject: [code-reflection] RFR: OnnxLift prototype [v4] In-Reply-To: References: Message-ID: > This is a prototype of OnnxLift tool. > It lifts ONNX model binary to ONNX code reflection model, extracts weights, and generates Java model source. Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: added class name cmd option ------------- Changes: - all: https://git.openjdk.org/babylon/pull/638/files - new: https://git.openjdk.org/babylon/pull/638/files/4aa3ce64..bf54e820 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=03 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=02-03 Stats: 9 lines in 3 files changed: 2 ins; 0 del; 7 mod Patch: https://git.openjdk.org/babylon/pull/638.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/638/head:pull/638 PR: https://git.openjdk.org/babylon/pull/638 From jnett96 at gmail.com Mon Oct 27 18:47:17 2025 From: jnett96 at gmail.com (Ryan Nett) Date: Mon, 27 Oct 2025 11:47:17 -0700 Subject: Babylon and MLIR Message-ID: Hi folks, I've seen Babylon's code model's similarity to MLIR be mentioned in a few conference talks, and was wondering if there were any plans to support MLIR as a "destination" via a 1st party library or something like HAT? There are several existing projects that take MLIR as input and compile it to optimized device code (e.g. IREE, XLA, this list ), so if Java code could easily be converted to MLIR it could open up many integrations and support for additional devices without requiring any work on the Java side. Thanks, Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From duke at openjdk.org Mon Oct 27 21:00:26 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 27 Oct 2025 21:00:26 GMT Subject: [code-reflection] RFR: Upgrade ONNX runtime to use API version 1.23.1 Message-ID: This PR contains the following: - [x] Upgrade to version 1.23.1 ONNX runtime API. - [x] Refactoring of the python script `AttributeProto` is now in `onnx` (I used version `1.19.1` which is the latest) - [x] Regeneration of tensors and tensor operations. - [x] Regeneration of the runtime API based on `onnxruntime_c_api.h`. - [x] Appends execution provider options to runtime, as shown in the new API, - [x] Allows users to append execution providers like `WebGpuExecutionProvider` and `CpuExecutionProvider` through `OnnxRuntime.appendExecutionProvider_V2` method. ------------- Commit messages: - Update full name - Attempt to fix the the trailing whitespaces from generation. - Merge remote-tracking branch 'origin/upgrade-onnx-runtime' into upgrade-onnx-runtime - Merge branch 'openjdk:code-reflection' into upgrade-onnx-runtime - Add implementation for custom Execution Provider libraries. - Fix compilation errors and minimize friction with changes in OnnxRuntime. - Upgrade ONNX prototype to use version 1.23.1 of the ONNX runtime C library. Changes: https://git.openjdk.org/babylon/pull/645/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=00 Stats: 49849 lines in 41 files changed: 42947 ins; 3317 del; 3585 mod Patch: https://git.openjdk.org/babylon/pull/645.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/645/head:pull/645 PR: https://git.openjdk.org/babylon/pull/645 From duke at openjdk.org Mon Oct 27 21:49:18 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 27 Oct 2025 21:49:18 GMT Subject: [code-reflection] RFR: Upgrade ONNX runtime to use API version 1.23.1 [v2] In-Reply-To: References: Message-ID: > This PR contains the following: > > - [x] Upgrade to version 1.23.1 ONNX runtime API. > - [x] Refactoring of the python script as `AttributeProto` is now in `onnx` (I used version `1.19.1` which is the latest) > - [x] Regeneration of tensors and tensor operations. > - [x] Regeneration of the runtime API based on `onnxruntime_c_api.h`. > - [x] Appends execution provider options to runtime, as shown in the `[new API](https://onnxruntime.ai/docs/execution-providers/CoreML-ExecutionProvider.html)`. > - [x] Allows users to append execution providers like `WebGpuExecutionProvider` and `CpuExecutionProvider` through `OnnxRuntime.appendExecutionProvider_V2` method. Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Add enable on subgraphs for more speed. Signed-off-by: ammbra ------------- Changes: - all: https://git.openjdk.org/babylon/pull/645/files - new: https://git.openjdk.org/babylon/pull/645/files/b4c00fc4..fbe9869b Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/babylon/pull/645.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/645/head:pull/645 PR: https://git.openjdk.org/babylon/pull/645 From duke at openjdk.org Mon Oct 27 21:59:52 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Mon, 27 Oct 2025 21:59:52 GMT Subject: [code-reflection] RFR: Upgrade ONNX runtime to use API version 1.23.1 [v3] In-Reply-To: References: Message-ID: > This PR contains the following: > > - [x] Upgrade to version 1.23.1 ONNX runtime API. > - [x] Refactoring of the python script as `AttributeProto` is now in `onnx` (I used version `1.19.1` which is the latest) > - [x] Regeneration of tensors and tensor operations. > - [x] Regeneration of the runtime API based on `onnxruntime_c_api.h`. > - [x] Appends execution provider options to runtime, as shown in the `[new API](https://onnxruntime.ai/docs/execution-providers/CoreML-ExecutionProvider.html)`. > - [x] Allows users to append execution providers like `WebGpuExecutionProvider` and `CpuExecutionProvider` through `OnnxRuntime.appendExecutionProvider_V2` method. Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Allow low-precision accumulation on a GPU. Signed-off-by: ammbra ------------- Changes: - all: https://git.openjdk.org/babylon/pull/645/files - new: https://git.openjdk.org/babylon/pull/645/files/fbe9869b..1d67ef6a Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=02 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=01-02 Stats: 4 lines in 1 file changed: 2 ins; 1 del; 1 mod Patch: https://git.openjdk.org/babylon/pull/645.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/645/head:pull/645 PR: https://git.openjdk.org/babylon/pull/645 From paul.sandoz at oracle.com Mon Oct 27 22:02:22 2025 From: paul.sandoz at oracle.com (Paul Sandoz) Date: Mon, 27 Oct 2025 22:02:22 +0000 Subject: Babylon and MLIR In-Reply-To: References: Message-ID: <725880CC-2AD5-4320-9A8A-BFD9BB8E19FA@oracle.com> Hi Ryan, We have been inspired by the design of MLIR, partly (in theory) to make it easier to translate to MLIR and therefore easier to leverage native MLIR compiler toolchains, just like you indicate. We did an experiment translating Java code to the Triton MLIR dialect and inputing into Intel?s SPIRV compiler pipeline to generate GPU kernels. That?s as far as we have explored things. It needs to be proved out more, but we don?t have any plans to do more at the moment as we (as in us folks at Oracle) are maxed out focusing on other areas. I was hoping some folks in the community might be interested in further experiments. HAT could be a very an interesting area to focus on e.g., a HAT accelerator that generates MLIR kernels from Java code in the HAT programming model. Paul. On Oct 27, 2025, at 11:47?AM, Ryan Nett wrote: Hi folks, I've seen Babylon's code model's similarity to MLIR be mentioned in a few conference talks, and was wondering if there were any plans to support MLIR as a "destination" via a 1st party library or something like HAT? There are several existing projects that take MLIR as input and compile it to optimized device code (e.g. IREE, XLA, this list), so if Java code could easily be converted to MLIR it could open up many integrations and support for additional devices without requiring any work on the Java side. Thanks, Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From asotona at openjdk.org Wed Oct 29 11:45:51 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 11:45:51 GMT Subject: [code-reflection] RFR: Fixed BytecodeGenerator INDY calls with invalid interface method type Message-ID: `BytecodeGenerator` provided INDY calls with invalid `interfaceMethodType` when it differs from the actual `dynamicMethodType`. ------------- Commit messages: - Fixed BytecodeGenerator INDY Changes: https://git.openjdk.org/babylon/pull/648/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=648&range=00 Stats: 29 lines in 2 files changed: 17 ins; 0 del; 12 mod Patch: https://git.openjdk.org/babylon/pull/648.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/648/head:pull/648 PR: https://git.openjdk.org/babylon/pull/648 From psandoz at openjdk.org Wed Oct 29 16:31:58 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Wed, 29 Oct 2025 16:31:58 GMT Subject: [code-reflection] RFR: Fixed BytecodeGenerator INDY calls with invalid interface method type In-Reply-To: References: Message-ID: On Wed, 29 Oct 2025 11:40:01 GMT, Adam Sotona wrote: > `BytecodeGenerator` provided INDY calls with invalid `interfaceMethodType` when it differs from the actual `dynamicMethodType`. Marked as reviewed by psandoz (Lead). ------------- PR Review: https://git.openjdk.org/babylon/pull/648#pullrequestreview-3394753473 From asotona at openjdk.org Wed Oct 29 18:13:22 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 18:13:22 GMT Subject: git: openjdk/babylon: code-reflection: Fixed BytecodeGenerator INDY calls with invalid interface method type Message-ID: Changeset: 2dd513ad Branch: code-reflection Author: Adam Sotona Date: 2025-10-29 18:09:53 +0000 URL: https://git.openjdk.org/babylon/commit/2dd513ad74b2c7a005a019f08739c9777ce719a8 Fixed BytecodeGenerator INDY calls with invalid interface method type Reviewed-by: psandoz ! src/jdk.incubator.code/share/classes/jdk/incubator/code/bytecode/BytecodeGenerator.java ! test/jdk/java/lang/reflect/code/bytecode/TestBytecode.java From asotona at openjdk.org Wed Oct 29 18:13:21 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 18:13:21 GMT Subject: [code-reflection] RFR: Fixed BytecodeGenerator INDY calls with invalid interface method type In-Reply-To: References: Message-ID: <_DdmlOVPm4gUqqv9rjYqOql0NJqX0GzIZRjG0P3Zvy0=.df2ce599-71e3-4be4-9257-985be4cc77c0@github.com> On Wed, 29 Oct 2025 11:40:01 GMT, Adam Sotona wrote: > `BytecodeGenerator` provided INDY calls with invalid `interfaceMethodType` when it differs from the actual `dynamicMethodType`. Thank you for the review. ------------- PR Comment: https://git.openjdk.org/babylon/pull/648#issuecomment-3462939183 From asotona at openjdk.org Wed Oct 29 18:13:22 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 18:13:22 GMT Subject: [code-reflection] Integrated: Fixed BytecodeGenerator INDY calls with invalid interface method type In-Reply-To: References: Message-ID: On Wed, 29 Oct 2025 11:40:01 GMT, Adam Sotona wrote: > `BytecodeGenerator` provided INDY calls with invalid `interfaceMethodType` when it differs from the actual `dynamicMethodType`. This pull request has now been integrated. Changeset: 2dd513ad Author: Adam Sotona URL: https://git.openjdk.org/babylon/commit/2dd513ad74b2c7a005a019f08739c9777ce719a8 Stats: 29 lines in 2 files changed: 17 ins; 0 del; 12 mod Fixed BytecodeGenerator INDY calls with invalid interface method type Reviewed-by: psandoz ------------- PR: https://git.openjdk.org/babylon/pull/648 From asotona at openjdk.org Wed Oct 29 18:48:05 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 18:48:05 GMT Subject: [code-reflection] RFR: Upgrade ONNX runtime to use API version 1.23.1 [v3] In-Reply-To: References: Message-ID: On Mon, 27 Oct 2025 21:59:52 GMT, Ana Maria Mihalceanu wrote: >> This PR contains the following: >> >> - [x] Upgrade to version 1.23.1 ONNX runtime API. >> - [x] Refactoring of the python script as `AttributeProto` is now in `onnx` (I used version `1.19.1` which is the latest) >> - [x] Regeneration of tensors and tensor operations. >> - [x] Regeneration of the runtime API based on `onnxruntime_c_api.h`. >> - [x] Appends execution provider options to runtime, as shown in the [new API](https://onnxruntime.ai/docs/execution-providers/CoreML-ExecutionProvider.html). >> - [x] Allows users to append execution providers like `WebGpuExecutionProvider` and `CpuExecutionProvider` through `OnnxRuntime.appendExecutionProvider_V2` method. >> >> CC @LizeRaes > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Allow low-precision accumulation on a GPU. > > Signed-off-by: ammbra It looks and works great! I found just some NITs. cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxProvider.java line 1: > 1: package oracle.code.onnx; Missing copyright header cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERInference.java line 35: > 33: import java.lang.foreign.Arena; > 34: import java.net.URL; > 35: import java.util.Map; unused imports? cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERInference.java line 39: > 37: > 38: import static oracle.code.onnx.fer.FERCoreMLDemo.IMAGE_SIZE; > 39: import static oracle.code.onnx.foreign.onnxruntime_c_api_h.*; unused imports? ------------- Marked as reviewed by asotona (Reviewer). PR Review: https://git.openjdk.org/babylon/pull/645#pullrequestreview-3395251346 PR Review Comment: https://git.openjdk.org/babylon/pull/645#discussion_r2474595088 PR Review Comment: https://git.openjdk.org/babylon/pull/645#discussion_r2474677780 PR Review Comment: https://git.openjdk.org/babylon/pull/645#discussion_r2474681806 From duke at openjdk.org Wed Oct 29 19:24:32 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Wed, 29 Oct 2025 19:24:32 GMT Subject: [code-reflection] RFR: Upgrade ONNX runtime to use API version 1.23.1 [v4] In-Reply-To: References: Message-ID: <7oBiUeRNDc7teZmbg1ONM6l750ABYmGVDtdTiY9w-TY=.f37d6bf5-b2a9-44c6-bf36-e15ca593cd49@github.com> > This PR contains the following: > > - [x] Upgrade to version 1.23.1 ONNX runtime API. > - [x] Refactoring of the python script as `AttributeProto` is now in `onnx` (I used version `1.19.1` which is the latest) > - [x] Regeneration of tensors and tensor operations. > - [x] Regeneration of the runtime API based on `onnxruntime_c_api.h`. > - [x] Appends execution provider options to runtime, as shown in the [new API](https://onnxruntime.ai/docs/execution-providers/CoreML-ExecutionProvider.html). > - [x] Allows users to append execution providers like `WebGpuExecutionProvider` and `CpuExecutionProvider` through `OnnxRuntime.appendExecutionProvider_V2` method. > > CC @LizeRaes Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Remove unused imports. Signed-off-by: ammbra ------------- Changes: - all: https://git.openjdk.org/babylon/pull/645/files - new: https://git.openjdk.org/babylon/pull/645/files/1d67ef6a..354c1149 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=03 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/645.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/645/head:pull/645 PR: https://git.openjdk.org/babylon/pull/645 From duke at openjdk.org Wed Oct 29 19:24:37 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Wed, 29 Oct 2025 19:24:37 GMT Subject: [code-reflection] RFR: Upgrade ONNX runtime to use API version 1.23.1 [v3] In-Reply-To: References: Message-ID: On Wed, 29 Oct 2025 18:37:50 GMT, Adam Sotona wrote: >> Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: >> >> Allow low-precision accumulation on a GPU. >> >> Signed-off-by: ammbra > > cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERInference.java line 35: > >> 33: import java.lang.foreign.Arena; >> 34: import java.net.URL; >> 35: import java.util.Map; > > unused imports? Yes, I removed those in my recent commit. Thank you for catching them. > cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERInference.java line 39: > >> 37: >> 38: import static oracle.code.onnx.fer.FERCoreMLDemo.IMAGE_SIZE; >> 39: import static oracle.code.onnx.foreign.onnxruntime_c_api_h.*; > > unused imports? Yes, I forgot about these ? . Thank you for catching them. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/645#discussion_r2475030349 PR Review Comment: https://git.openjdk.org/babylon/pull/645#discussion_r2475028608 From duke at openjdk.org Wed Oct 29 19:34:31 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Wed, 29 Oct 2025 19:34:31 GMT Subject: [code-reflection] RFR: Upgrade ONNX runtime to use API version 1.23.1 [v5] In-Reply-To: References: Message-ID: > This PR contains the following: > > - [x] Upgrade to version 1.23.1 ONNX runtime API. > - [x] Refactoring of the python script as `AttributeProto` is now in `onnx` (I used version `1.19.1` which is the latest) > - [x] Regeneration of tensors and tensor operations. > - [x] Regeneration of the runtime API based on `onnxruntime_c_api.h`. > - [x] Appends execution provider options to runtime, as shown in the [new API](https://onnxruntime.ai/docs/execution-providers/CoreML-ExecutionProvider.html). > - [x] Allows users to append execution providers like `WebGpuExecutionProvider` and `CpuExecutionProvider` through `OnnxRuntime.appendExecutionProvider_V2` method. > > CC @LizeRaes Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Add copyright header. Signed-off-by: ammbra ------------- Changes: - all: https://git.openjdk.org/babylon/pull/645/files - new: https://git.openjdk.org/babylon/pull/645/files/354c1149..5f37308b Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=04 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=645&range=03-04 Stats: 25 lines in 1 file changed: 25 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/645.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/645/head:pull/645 PR: https://git.openjdk.org/babylon/pull/645 From duke at openjdk.org Wed Oct 29 19:34:34 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Wed, 29 Oct 2025 19:34:34 GMT Subject: [code-reflection] RFR: Upgrade ONNX runtime to use API version 1.23.1 [v3] In-Reply-To: References: Message-ID: On Wed, 29 Oct 2025 18:27:16 GMT, Adam Sotona wrote: >> Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: >> >> Allow low-precision accumulation on a GPU. >> >> Signed-off-by: ammbra > > cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxProvider.java line 1: > >> 1: package oracle.code.onnx; > > Missing copyright header Added in the recent commit ? ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/645#discussion_r2475055631 From duke at openjdk.org Wed Oct 29 19:34:35 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Wed, 29 Oct 2025 19:34:35 GMT Subject: [code-reflection] Integrated: Upgrade ONNX runtime to use API version 1.23.1 In-Reply-To: References: Message-ID: On Mon, 27 Oct 2025 20:37:13 GMT, Ana Maria Mihalceanu wrote: > This PR contains the following: > > - [x] Upgrade to version 1.23.1 ONNX runtime API. > - [x] Refactoring of the python script as `AttributeProto` is now in `onnx` (I used version `1.19.1` which is the latest) > - [x] Regeneration of tensors and tensor operations. > - [x] Regeneration of the runtime API based on `onnxruntime_c_api.h`. > - [x] Appends execution provider options to runtime, as shown in the [new API](https://onnxruntime.ai/docs/execution-providers/CoreML-ExecutionProvider.html). > - [x] Allows users to append execution providers like `WebGpuExecutionProvider` and `CpuExecutionProvider` through `OnnxRuntime.appendExecutionProvider_V2` method. > > CC @LizeRaes This pull request has now been integrated. Changeset: 59a20e81 Author: ammbra Committer: Adam Sotona URL: https://git.openjdk.org/babylon/commit/59a20e814588b6efe49cb67284814c20b23f6f7c Stats: 49874 lines in 41 files changed: 42971 ins; 3317 del; 3586 mod Upgrade ONNX runtime to use API version 1.23.1 Reviewed-by: asotona ------------- PR: https://git.openjdk.org/babylon/pull/645 From asotona at openjdk.org Wed Oct 29 19:36:29 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 19:36:29 GMT Subject: git: openjdk/babylon: code-reflection: Upgrade ONNX runtime to use API version 1.23.1 Message-ID: Changeset: 59a20e81 Branch: code-reflection Author: ammbra Committer: Adam Sotona Date: 2025-10-29 19:30:23 +0000 URL: https://git.openjdk.org/babylon/commit/59a20e814588b6efe49cb67284814c20b23f6f7c Upgrade ONNX runtime to use API version 1.23.1 Reviewed-by: asotona ! cr-examples/onnx/opgen/onnxOpSchemaToJSON.py ! cr-examples/onnx/opgen/setup.sh ! cr-examples/onnx/pom.xml ! cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxOperators.java + cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxProvider.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxRuntime.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/EpSelectionDelegate.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtAllocator.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtApi.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtApiBase.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtCUDAProviderOptions.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtCompileApi.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtCustomCreateThreadFn.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtCustomHandleType.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtCustomJoinThreadFn.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtCustomOp.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtGetInitializerLocationFunc.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtLoggingFunction.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtMIGraphXProviderOptions.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtModelEditorApi.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtOpenVINOProviderOptions.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtROCMProviderOptions.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtTensorRTProviderOptions.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtThreadWorkerFn.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/OrtWriteBufferFunc.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/RegisterCustomOpsFn.java + cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/RunAsyncCallbackFn.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/foreign/onnxruntime_c_api_h.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/ir/OnnxOps.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/ir/OnnxType.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/proto/OnnxBuilder.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/proto/OnnxConstants.java ! cr-examples/onnx/src/main/java/oracle/code/onnx/proto/OnnxModel.java - cr-examples/onnx/src/main/java/oracle/code/onnx/provider/CoreMLProvider.java - cr-examples/onnx/src/main/java/oracle/code/onnx/provider/OnnxProvider.java ! cr-examples/onnx/src/test/java/oracle/code/onnx/CNNTest.java ! cr-examples/onnx/src/test/java/oracle/code/onnx/RuntimeTest.java ! cr-examples/onnx/src/test/java/oracle/code/onnx/WalkTheMazeTest.java ! cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERCoreMLDemo.java ! cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERInference.java ! cr-examples/onnx/src/test/java/oracle/code/onnx/llm/LlamaModel.java From gfrost at openjdk.org Wed Oct 29 19:42:50 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 29 Oct 2025 19:42:50 GMT Subject: [code-reflection] Integrated: Hat refactor view Message-ID: Small changes to view example. I am playing with iface/record vector implementations A small regex change also in here ------------- Commit messages: - regex changes - replace pools - merging types - merging types - merging types - merging types - merging types - Refactor index pools and delete dead code Changes: https://git.openjdk.org/babylon/pull/649/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=649&range=00 Stats: 1979 lines in 30 files changed: 852 ins; 918 del; 209 mod Patch: https://git.openjdk.org/babylon/pull/649.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/649/head:pull/649 PR: https://git.openjdk.org/babylon/pull/649 From gfrost at openjdk.org Wed Oct 29 19:42:53 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 29 Oct 2025 19:42:53 GMT Subject: [code-reflection] Integrated: Hat refactor view In-Reply-To: References: Message-ID: On Wed, 29 Oct 2025 19:35:31 GMT, Gary Frost wrote: > Small changes to view example. > > I am playing with iface/record vector implementations > > A small regex change also in here This pull request has now been integrated. Changeset: d175d75a Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/d175d75ae9287e2d858fc73a9dd352514ea37a3c Stats: 1979 lines in 30 files changed: 852 ins; 918 del; 209 mod Hat refactor view ------------- PR: https://git.openjdk.org/babylon/pull/649 From gfrost at openjdk.org Wed Oct 29 19:44:52 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 29 Oct 2025 19:44:52 GMT Subject: git: openjdk/babylon: code-reflection: Hat refactor view Message-ID: <16eecc6a-f214-4933-b827-ff4ba4f3c07b@openjdk.org> Changeset: d175d75a Branch: code-reflection Author: Gary Frost Date: 2025-10-29 19:39:43 +0000 URL: https://git.openjdk.org/babylon/commit/d175d75ae9287e2d858fc73a9dd352514ea37a3c Hat refactor view ! hat/core/src/main/java/hat/util/Regex.java ! hat/examples/view/src/main/java/view/EliteMeshReader.java ! hat/examples/view/src/main/java/view/Main.java + hat/examples/view/src/main/java/view/ModelHighWaterMark.java = hat/examples/view/src/main/java/view/Physics.java ! hat/examples/view/src/main/java/view/Rasterizer.java + hat/examples/view/src/main/java/view/Renderer.java ! hat/examples/view/src/main/java/view/ViewFrame.java ! hat/examples/view/src/main/java/view/ZPos.java ! hat/examples/view/src/main/java/view/f32/F32Line3D.java - hat/examples/view/src/main/java/view/f32/F32Mat4.java + hat/examples/view/src/main/java/view/f32/F32Matrix4x4.java ! hat/examples/view/src/main/java/view/f32/F32Mesh3D.java + hat/examples/view/src/main/java/view/f32/F32Triangle2D.java ! hat/examples/view/src/main/java/view/f32/F32Triangle3D.java + hat/examples/view/src/main/java/view/f32/F32Vec2.java ! hat/examples/view/src/main/java/view/f32/F32Vec3.java + hat/examples/view/src/main/java/view/f32/FloatPool.java + hat/examples/view/src/main/java/view/f32/IndexPool.java + hat/examples/view/src/main/java/view/f32/Pool.java - hat/examples/view/src/main/java/view/f32/mat4.java - hat/examples/view/src/main/java/view/f32/projectionMat4.java - hat/examples/view/src/main/java/view/f32/rotationMat4.java - hat/examples/view/src/main/java/view/f32/scaleMat4.java - hat/examples/view/src/main/java/view/f32/translateMat4.java - hat/examples/view/src/main/java/view/f32/tri.java - hat/examples/view/src/main/java/view/f32/vec3.java - hat/examples/view/src/main/java/view/i32/I32Line2D.java - hat/examples/view/src/main/java/view/i32/I32Triangle2D.java - hat/examples/view/src/main/java/view/i32/I32Vec2.java From asotona at openjdk.org Wed Oct 29 21:33:25 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 21:33:25 GMT Subject: [code-reflection] RFR: OnnxLift prototype [v5] In-Reply-To: References: Message-ID: > This is a prototype of OnnxLift tool. > It lifts ONNX model binary to ONNX code reflection model, extracts weights, and generates Java model source. Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision: - fixed imports - rollback of Tensor factory as Constant attribute - fixed imports - Merge branch 'code-reflection' into onnx-lift-prototype - added class name cmd option - refactoring split to JavaTemplate - missing annotation - OnnxLift prototype ------------- Changes: - all: https://git.openjdk.org/babylon/pull/638/files - new: https://git.openjdk.org/babylon/pull/638/files/bf54e820..943b85af Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=04 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=638&range=03-04 Stats: 52309 lines in 88 files changed: 44061 ins; 4353 del; 3895 mod Patch: https://git.openjdk.org/babylon/pull/638.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/638/head:pull/638 PR: https://git.openjdk.org/babylon/pull/638 From asotona at openjdk.org Wed Oct 29 21:36:17 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 21:36:17 GMT Subject: git: openjdk/babylon: code-reflection: OnnxLift prototype Message-ID: <652ca2d4-dde6-44b5-a38e-cbeda103e78b@openjdk.org> Changeset: df377fb2 Branch: code-reflection Author: Adam Sotona Date: 2025-10-29 21:35:10 +0000 URL: https://git.openjdk.org/babylon/commit/df377fb293c362210b1e7a55f02b064992e0c727 OnnxLift prototype ! cr-examples/onnx/README.md ! cr-examples/onnx/pom.xml + cr-examples/onnx/src/main/java/oracle/code/onnx/lift/JavaTemplate.java + cr-examples/onnx/src/main/java/oracle/code/onnx/lift/OnnxLift.java From asotona at openjdk.org Wed Oct 29 21:38:35 2025 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 29 Oct 2025 21:38:35 GMT Subject: [code-reflection] Integrated: OnnxLift prototype In-Reply-To: References: Message-ID: On Fri, 24 Oct 2025 09:19:15 GMT, Adam Sotona wrote: > This is a prototype of OnnxLift tool. > It lifts ONNX model binary to ONNX code reflection model, extracts weights, and generates Java model source. This pull request has now been integrated. Changeset: df377fb2 Author: Adam Sotona URL: https://git.openjdk.org/babylon/commit/df377fb293c362210b1e7a55f02b064992e0c727 Stats: 784 lines in 4 files changed: 782 ins; 1 del; 1 mod OnnxLift prototype ------------- PR: https://git.openjdk.org/babylon/pull/638 From mabbay at openjdk.org Thu Oct 30 10:16:57 2025 From: mabbay at openjdk.org (Mourad Abbay) Date: Thu, 30 Oct 2025 10:16:57 GMT Subject: [code-reflection] RFR: Replace methods "create" in Op subclasses by constructors [v3] In-Reply-To: References: Message-ID: > By using flexible constructor bodies feature, we get rid of methods "create" in Op subclasses and we replace it with constructors. We also remove unused constructors and methods in Op subclasses. Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision: Apply suggestion ------------- Changes: - all: https://git.openjdk.org/babylon/pull/584/files - new: https://git.openjdk.org/babylon/pull/584/files/372cc17b..49d4367b Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=584&range=02 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=584&range=01-02 Stats: 14 lines in 1 file changed: 7 ins; 7 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/584.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/584/head:pull/584 PR: https://git.openjdk.org/babylon/pull/584 From mabbay at openjdk.org Thu Oct 30 10:16:58 2025 From: mabbay at openjdk.org (Mourad Abbay) Date: Thu, 30 Oct 2025 10:16:58 GMT Subject: [code-reflection] Integrated: Replace methods "create" in Op subclasses by constructors In-Reply-To: References: Message-ID: On Fri, 26 Sep 2025 18:46:41 GMT, Mourad Abbay wrote: > By using flexible constructor bodies feature, we get rid of methods "create" in Op subclasses and we replace it with constructors. We also remove unused constructors and methods in Op subclasses. This pull request has now been integrated. Changeset: 837bb95f Author: Mourad Abbay URL: https://git.openjdk.org/babylon/commit/837bb95fb29152fcd827de623399136c5974d1e2 Stats: 84 lines in 2 files changed: 10 ins; 19 del; 55 mod Replace methods "create" in Op subclasses by constructors Reviewed-by: psandoz ------------- PR: https://git.openjdk.org/babylon/pull/584 From mabbay at openjdk.org Thu Oct 30 10:21:13 2025 From: mabbay at openjdk.org (Mourad Abbay) Date: Thu, 30 Oct 2025 10:21:13 GMT Subject: git: openjdk/babylon: code-reflection: Replace methods "create" in Op subclasses by constructors Message-ID: <2041c095-a524-443f-8ee0-2b2d0be6cb0f@openjdk.org> Changeset: 837bb95f Branch: code-reflection Author: Mourad Abbay Date: 2025-10-30 10:13:52 +0000 URL: https://git.openjdk.org/babylon/commit/837bb95fb29152fcd827de623399136c5974d1e2 Replace methods "create" in Op subclasses by constructors Reviewed-by: psandoz ! src/jdk.incubator.code/share/classes/jdk/incubator/code/dialect/core/CoreOp.java ! src/jdk.incubator.code/share/classes/jdk/incubator/code/dialect/java/JavaOp.java From gfrost at openjdk.org Thu Oct 30 13:48:10 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 30 Oct 2025 13:48:10 GMT Subject: [code-reflection] Integrated: Hat view more tinkering Message-ID: <4AWK_ypeQnQ2ktpxn7pdWZMGWJni3IE2XuywmIZSHWQ=.bf47230b-4c57-4240-9331-f9058cb0632e@github.com> Ignore this ;) I am migrating view example across to use vector types compatible with HAT. Work in progress.. more to come, ------------- Commit messages: - slowly migrating to removing pools - safety checkin #4 simplify - safety checkin #3 - use old for now - safety checkin #2 - safety checkin Changes: https://git.openjdk.org/babylon/pull/650/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=650&range=00 Stats: 1913 lines in 10 files changed: 1673 ins; 165 del; 75 mod Patch: https://git.openjdk.org/babylon/pull/650.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/650/head:pull/650 PR: https://git.openjdk.org/babylon/pull/650 From gfrost at openjdk.org Thu Oct 30 13:48:11 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 30 Oct 2025 13:48:11 GMT Subject: [code-reflection] Integrated: Hat view more tinkering In-Reply-To: <4AWK_ypeQnQ2ktpxn7pdWZMGWJni3IE2XuywmIZSHWQ=.bf47230b-4c57-4240-9331-f9058cb0632e@github.com> References: <4AWK_ypeQnQ2ktpxn7pdWZMGWJni3IE2XuywmIZSHWQ=.bf47230b-4c57-4240-9331-f9058cb0632e@github.com> Message-ID: On Thu, 30 Oct 2025 13:39:02 GMT, Gary Frost wrote: > Ignore this ;) I am migrating view example across to use vector types compatible with HAT. > > Work in progress.. more to come, This pull request has now been integrated. Changeset: ceb9524c Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/ceb9524c6bcce6166b736043397599ebd3b99024 Stats: 1913 lines in 10 files changed: 1673 ins; 165 del; 75 mod Hat view more tinkering ------------- PR: https://git.openjdk.org/babylon/pull/650 From gfrost at openjdk.org Thu Oct 30 13:50:53 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 30 Oct 2025 13:50:53 GMT Subject: git: openjdk/babylon: code-reflection: Hat view more tinkering Message-ID: <6703de2a-2ab4-434d-a35f-ca7f283d3262@openjdk.org> Changeset: ceb9524c Branch: code-reflection Author: Gary Frost Date: 2025-10-30 13:43:39 +0000 URL: https://git.openjdk.org/babylon/commit/ceb9524c6bcce6166b736043397599ebd3b99024 Hat view more tinkering ! hat/examples/experiments/src/main/java/experiments/PrefixSum.java ! hat/examples/view/src/main/java/view/EliteMeshReader.java + hat/examples/view/src/main/java/view/F32.java ! hat/examples/view/src/main/java/view/Main.java - hat/examples/view/src/main/java/view/Physics.java ! hat/examples/view/src/main/java/view/Rasterizer.java ! hat/examples/view/src/main/java/view/Renderer.java ! hat/examples/view/src/main/java/view/ViewFrame.java + hat/examples/view/src/main/java/view/ViewFrameNew.java + hat/examples/view/src/main/java/view/ViewFrameOld.java From gfrost at openjdk.org Thu Oct 30 15:06:13 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 30 Oct 2025 15:06:13 GMT Subject: [code-reflection] Integrated: Moved job src into hat project Message-ID: We have been using job (java opinionated builder) for some time. The code has been sitting on my local disk. To create job.jar (should only be needed if we change the builder source ) bash hat/bootstrap.bash After that `java @hat/xxxx` will use the modified job.jar. Please check job.jar back in if you make changes that we need. ------------- Commit messages: - job src into hat project Changes: https://git.openjdk.org/babylon/pull/651/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=651&range=00 Stats: 3740 lines in 31 files changed: 3723 ins; 16 del; 1 mod Patch: https://git.openjdk.org/babylon/pull/651.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/651/head:pull/651 PR: https://git.openjdk.org/babylon/pull/651 From gfrost at openjdk.org Thu Oct 30 15:06:13 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 30 Oct 2025 15:06:13 GMT Subject: [code-reflection] Integrated: Moved job src into hat project In-Reply-To: References: Message-ID: On Thu, 30 Oct 2025 14:56:55 GMT, Gary Frost wrote: > We have been using job (java opinionated builder) for some time. The code has been sitting on my local disk. > > To create job.jar (should only be needed if we change the builder source ) > > > bash hat/bootstrap.bash > > > After that `java @hat/xxxx` will use the modified job.jar. > > Please check job.jar back in if you make changes that we need. This pull request has now been integrated. Changeset: b6b09e85 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/b6b09e85cdbe57d2817f6f7e5f4b2ecab2850a5a Stats: 3740 lines in 31 files changed: 3723 ins; 16 del; 1 mod Moved job src into hat project ------------- PR: https://git.openjdk.org/babylon/pull/651 From gfrost at openjdk.org Thu Oct 30 15:09:25 2025 From: gfrost at openjdk.org (Gary Frost) Date: Thu, 30 Oct 2025 15:09:25 GMT Subject: git: openjdk/babylon: code-reflection: Moved job src into hat project Message-ID: Changeset: b6b09e85 Branch: code-reflection Author: Gary Frost Date: 2025-10-30 15:02:38 +0000 URL: https://git.openjdk.org/babylon/commit/b6b09e85cdbe57d2817f6f7e5f4b2ecab2850a5a Moved job src into hat project ! hat/examples/pom.xml ! hat/examples/view/src/main/java/view/F32.java ! hat/hat.java + hat/hat/bootstrap.bash ! hat/hat/job.jar + hat/hat/job/.gitignore + hat/hat/job/src/main/java/job/CMake.java + hat/hat/job/src/main/java/job/CMakeInfo.java + hat/hat/job/src/main/java/job/Cuda.java + hat/hat/job/src/main/java/job/Dag.java + hat/hat/job/src/main/java/job/Dependency.java + hat/hat/job/src/main/java/job/DependencyImpl.java + hat/hat/job/src/main/java/job/ForkExec.java + hat/hat/job/src/main/java/job/Intellij.java + hat/hat/job/src/main/java/job/JExtract.java + hat/hat/job/src/main/java/job/JExtractOptProvider.java + hat/hat/job/src/main/java/job/Jar.java + hat/hat/job/src/main/java/job/Linux.java + hat/hat/job/src/main/java/job/Mac.java + hat/hat/job/src/main/java/job/Maven.java + hat/hat/job/src/main/java/job/OpenCL.java + hat/hat/job/src/main/java/job/OpenGL.java + hat/hat/job/src/main/java/job/Opt.java + hat/hat/job/src/main/java/job/Project.java + hat/hat/job/src/main/java/job/Reporter.java + hat/hat/job/src/main/java/job/Util.java + hat/hat/job/src/main/java/job/Windows.java + hat/hat/job/src/main/java/job/XMLNode.java ! hat/intellij/.idea/modules.xml - hat/intellij/example_arrayview.iml + hat/intellij/job.iml From psandoz at openjdk.org Thu Oct 30 17:39:04 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Thu, 30 Oct 2025 17:39:04 GMT Subject: [code-reflection] RFR: Merge master Message-ID: Merge master into code-reflection. Building Babylon depends on JDK 25 and jtreg >= 8.1 ------------- Commit messages: - Merge master. - 8370851: Mark hotspot and jdk tests incompatible with test thread factory - 8370908: Remove test javax/management/remote/mandatory/connection/DeadLockTest.java from ProblemList-Virtual - 8369609: calls from Continuations to invalidate_jvmti_stack must be more accurate - 8370730: Test serviceability/attach/EarlyDynamicLoad/EarlyDynamicLoad.java needs to be resilient about warnings - 8351159: Remaining cleanups in cpu/x86 after 32-bit x86 removal - 8369435: C2: transform (LShiftX (SubX con0 a), con1) into (SubX con0< References: Message-ID: > Merge master into code-reflection. > > Building Babylon depends on JDK 25 and jtreg >= 8.1 Paul Sandoz has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 614 commits: - Merge master. - Moved job src into hat project - Hat view more tinkering - Replace methods "create" in Op subclasses by constructors Reviewed-by: psandoz - OnnxLift prototype - Hat refactor view - Upgrade ONNX runtime to use API version 1.23.1 Reviewed-by: asotona - Fixed BytecodeGenerator INDY calls with invalid interface method type Reviewed-by: psandoz - Coverted enum base view parser to iface based - Hat util regex - ... and 604 more: https://git.openjdk.org/babylon/compare/ed36b9bb...d2fb4e29 ------------- Changes: https://git.openjdk.org/babylon/pull/652/files Webrev: Webrev is not available because diff is too large Stats: 419432 lines in 1106 files changed: 419251 ins; 73 del; 108 mod Patch: https://git.openjdk.org/babylon/pull/652.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/652/head:pull/652 PR: https://git.openjdk.org/babylon/pull/652 From psandoz at openjdk.org Thu Oct 30 18:33:16 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Thu, 30 Oct 2025 18:33:16 GMT Subject: [code-reflection] Integrated: Merge master In-Reply-To: References: Message-ID: On Thu, 30 Oct 2025 17:31:15 GMT, Paul Sandoz wrote: > Merge master into code-reflection. > > Building Babylon depends on JDK 25 and jtreg >= 8.1 This pull request has now been integrated. Changeset: c87e5746 Author: Paul Sandoz URL: https://git.openjdk.org/babylon/commit/c87e5746aaa35efb02ab5d2eb5026a3f20c00878 Stats: 436122 lines in 6606 files changed: 291354 ins; 100262 del; 44506 mod Merge ------------- PR: https://git.openjdk.org/babylon/pull/652 From jfumero at openjdk.org Fri Oct 31 07:29:47 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 07:29:47 GMT Subject: git: openjdk/babylon: created branch hat/fp16/extension based on the branch code-reflection containing 1 unique commit Message-ID: The following commits are unique to the hat/fp16/extension branch: ======================================================== 23da5523: [hat][wip] fp16 extensions From jfumero at openjdk.org Fri Oct 31 07:50:07 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 07:50:07 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v7] In-Reply-To: References: Message-ID: > This PR adds support for creating float4 objects within the device code: > > > Float4 f = Float4.of(x, y, z ,w) > > > In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: > > > Float4 vA ... > Float4 vB ... > Float4 vC = vA.linewise(vB, Float::sum); Juan Fumero has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 15 additional commits since the last revision: - Merge branch 'code-reflection' into hat/float4/of - [hat] config bits message fixed - [hat] Log Config bits for OpenCL moved to OpenCL backend instantiation - [hat] Dialect for handling vector types simplified - [hat] minor refactor ocl-codegen - [hat] codegen - cleanup old OpenCL typecasts - [hat] Move vectorOf codegen method to common C99 codegen - [hat] minor change - [hat] makeFloat4 from immutable supported on GPU - [hat][wip] float4 implementation with mutable/immutable variants - ... and 5 more: https://git.openjdk.org/babylon/compare/8d67a217...aec780a9 ------------- Changes: - all: https://git.openjdk.org/babylon/pull/642/files - new: https://git.openjdk.org/babylon/pull/642/files/251f1a52..aec780a9 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=06 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=05-06 Stats: 494433 lines in 6718 files changed: 341377 ins; 104665 del; 48391 mod Patch: https://git.openjdk.org/babylon/pull/642.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642 PR: https://git.openjdk.org/babylon/pull/642 From jfumero at openjdk.org Fri Oct 31 08:27:19 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 08:27:19 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v8] In-Reply-To: References: Message-ID: > This PR adds support for creating float4 objects within the device code: > > > Float4 f = Float4.of(x, y, z ,w) > > > In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: > > > Float4 vA ... > Float4 vB ... > Float4 vC = vA.linewise(vB, Float::sum); Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat][cuda] buildType method for vload/vstore restored ------------- Changes: - all: https://git.openjdk.org/babylon/pull/642/files - new: https://git.openjdk.org/babylon/pull/642/files/aec780a9..dfb349ce Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=07 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=06-07 Stats: 14 lines in 3 files changed: 14 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/642.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642 PR: https://git.openjdk.org/babylon/pull/642 From jfumero at openjdk.org Fri Oct 31 08:30:39 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 08:30:39 GMT Subject: [code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v8] In-Reply-To: References: Message-ID: On Fri, 31 Oct 2025 08:27:19 GMT, Juan Fumero wrote: >> This PR adds support for creating float4 objects within the device code: >> >> >> Float4 f = Float4.of(x, y, z ,w) >> >> >> In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: >> >> >> Float4 vA ... >> Float4 vB ... >> Float4 vC = vA.linewise(vB, Float::sum); > > Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: > > [hat][cuda] buildType method for vload/vstore restored PR ready and passing for both OpenCL and CUDA. ------------- PR Comment: https://git.openjdk.org/babylon/pull/642#issuecomment-3471830825 From jfumero at openjdk.org Fri Oct 31 08:30:41 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 08:30:41 GMT Subject: [code-reflection] Integrated: Proposal for supporting Float4.of for CPU host code and GPU device code In-Reply-To: References: Message-ID: On Fri, 24 Oct 2025 15:39:47 GMT, Juan Fumero wrote: > This PR adds support for creating float4 objects within the device code: > > > Float4 f = Float4.of(x, y, z ,w) > > > In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment: > > > Float4 vA ... > Float4 vB ... > Float4 vC = vA.linewise(vB, Float::sum); This pull request has now been integrated. Changeset: 420c933a Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/420c933a9e718fa193db4dc76c203fa0e4b2212e Stats: 811 lines in 29 files changed: 593 ins; 140 del; 78 mod Proposal for supporting Float4.of for CPU host code and GPU device code ------------- PR: https://git.openjdk.org/babylon/pull/642 From jfumero at openjdk.org Fri Oct 31 08:32:48 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 08:32:48 GMT Subject: git: openjdk/babylon: code-reflection: Proposal for supporting Float4.of for CPU host code and GPU device code Message-ID: Changeset: 420c933a Branch: code-reflection Author: Juan Fumero Date: 2025-10-31 08:28:19 +0000 URL: https://git.openjdk.org/babylon/commit/420c933a9e718fa193db4dc76c203fa0e4b2212e Proposal for supporting Float4.of for CPU host code and GPU device code ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java ! hat/backends/ffi/opencl/src/main/native/cpp/opencl_backend.cpp ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLHatKernelBuilder.java ! hat/core/src/main/java/hat/buffer/Buffer.java ! hat/core/src/main/java/hat/buffer/F32ArrayPadded.java ! hat/core/src/main/java/hat/buffer/Float4.java ! hat/core/src/main/java/hat/codebuilders/BabylonOpBuilder.java ! hat/core/src/main/java/hat/codebuilders/C99HATKernelBuilder.java ! hat/core/src/main/java/hat/codebuilders/CodeBuilder.java ! hat/core/src/main/java/hat/dialect/HATF16BinaryOp.java ! hat/core/src/main/java/hat/dialect/HATVectorBinaryOp.java ! hat/core/src/main/java/hat/dialect/HATVectorLoadOp.java + hat/core/src/main/java/hat/dialect/HATVectorMakeOfOp.java + hat/core/src/main/java/hat/dialect/HATVectorOfOp.java + hat/core/src/main/java/hat/dialect/HATVectorOp.java ! hat/core/src/main/java/hat/dialect/HATVectorSelectLoadOp.java ! hat/core/src/main/java/hat/dialect/HATVectorSelectStoreOp.java ! hat/core/src/main/java/hat/dialect/HATVectorStoreView.java ! hat/core/src/main/java/hat/dialect/HATVectorVarLoadOp.java ! hat/core/src/main/java/hat/dialect/HATVectorVarOp.java - hat/core/src/main/java/hat/dialect/HATVectorViewOp.java ! hat/core/src/main/java/hat/phases/HATDialectifyTier.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorOpPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorSelectPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorStorePhase.java ! hat/tests/src/main/java/hat/test/TestVectorTypes.java ! hat/tests/src/main/java/hat/test/engine/HatAsserts.java ! hat/tools/src/main/java/hat/tools/text/JavaHATCodeBuilder.java From jfumero at openjdk.org Fri Oct 31 09:28:16 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 09:28:16 GMT Subject: [code-reflection] RFR: Second Proposal to generalize handling of Vector Types based on 644 Message-ID: This PR adds another proposal for generalising HAT Vector Types. It is based on PR #644 as an alternative approach. So we can evaluate each proposal and device which one to move forward. This approach replaces the `@HATVectorType` annotation with a set of interfaces to identify base type and width of the vector type being represented. For instance: public interface _V { PrimitiveType type(); int width(); } public interface _V4 extends _V { @CodeReflection @Override default int width() { return 4; } } public interface Float4 extends _V4 { float x(); float y(); float z(); float w(); @CodeReflection @Override default PrimitiveType type() { return JavaType.FLOAT; } ... } Note that both methods, width and type, are annotated with `@CodeReflection`. During the "dialectify" process, this approach builds the code models for both methods and inspects the meta-data values. Some restrictions: - `Float4` is not an `iFace` interface due to the small granularity. - Usually, these types are inspected from the kernel code, so we don't have instance objects. - Returning `PrimitiveType` from the `type` method allows us to be restricted in the amount of base types to support. How to test: For OpenCL: HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl hat.test.TestVectorTypes For CUDA: HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda hat.test.TestVectorTypes This PR has been tested with both OpenCL and CUDA backends. ------------- Commit messages: - Merge branch 'code-reflection' into hat/vectors/generalv2 - Merge remote-tracking branch 'refs/remotes/personal/hat/vectors/generalv2' into hat/vectors/generalv2 - Merge remote-tracking branch 'refs/remotes/personal/hat/vectors/generalv2' into hat/vectors/generalv2 - [hat] CUDA backend fixed - [hat] RW vector float4 sample added - [hat] missing header license added - [hat] Generalise vectorisation type system and dialectify for HAT v2 - [hat] refactor for vector phases and scaffolding for vectors and interfaces - minor change - [hat] Proposal to generalise dialect for vector types - ... and 14 more: https://git.openjdk.org/babylon/compare/420c933a...6166cd63 Changes: https://git.openjdk.org/babylon/pull/647/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=647&range=00 Stats: 724 lines in 25 files changed: 468 ins; 147 del; 109 mod Patch: https://git.openjdk.org/babylon/pull/647.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/647/head:pull/647 PR: https://git.openjdk.org/babylon/pull/647 From jfumero at openjdk.org Fri Oct 31 09:38:41 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 09:38:41 GMT Subject: [code-reflection] RFR: Second Proposal to generalize handling of Vector Types based on 644 [v2] In-Reply-To: References: Message-ID: > This PR adds another proposal for generalising HAT Vector Types. > > It is based on PR #644 as an alternative approach. So we can evaluate each proposal and device which one to move forward. > > This approach replaces the `@HATVectorType` annotation with a set of interfaces to identify base type and width of the vector type being represented. > > For instance: > > > public interface _V { > PrimitiveType type(); > int width(); > } > > public interface _V4 extends _V { > > @CodeReflection > @Override > default int width() { > return 4; > } > } > > > public interface Float4 extends _V4 { > > float x(); > float y(); > float z(); > float w(); > > @CodeReflection > @Override > default PrimitiveType type() { > return JavaType.FLOAT; > } > > ... > > } > > > Note that both methods, width and type, are annotated with `@CodeReflection`. During the "dialectify" process, this approach builds the code models for both methods and inspects the meta-data values. > > Some restrictions: > > - `Float4` is not an `iFace` interface due to the small granularity. > - Usually, these types are inspected from the kernel code, so we don't have instance objects. > - Returning `PrimitiveType` from the `type` method allows us to be restricted in the amount of base types to support. > > > How to test: > > For OpenCL: > > > HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl hat.test.TestVectorTypes > > > For CUDA: > > > > HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda hat.test.TestVectorTypes > > > This PR has been tested with both OpenCL and CUDA backends. Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] Cleanup phase utils ------------- Changes: - all: https://git.openjdk.org/babylon/pull/647/files - new: https://git.openjdk.org/babylon/pull/647/files/6166cd63..0471a646 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=647&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=647&range=00-01 Stats: 393 lines in 5 files changed: 172 ins; 217 del; 4 mod Patch: https://git.openjdk.org/babylon/pull/647.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/647/head:pull/647 PR: https://git.openjdk.org/babylon/pull/647 From jfumero at openjdk.org Fri Oct 31 09:43:41 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 09:43:41 GMT Subject: [code-reflection] RFR: Second Proposal to generalize handling of Vector Types based on 644 [v2] In-Reply-To: References: Message-ID: On Fri, 31 Oct 2025 09:38:41 GMT, Juan Fumero wrote: >> This PR adds another proposal for generalising HAT Vector Types. >> >> It is based on PR #644 as an alternative approach. So we can evaluate each proposal and device which one to move forward. >> >> This approach replaces the `@HATVectorType` annotation with a set of interfaces to identify base type and width of the vector type being represented. >> >> For instance: >> >> >> public interface _V { >> PrimitiveType type(); >> int width(); >> } >> >> public interface _V4 extends _V { >> >> @CodeReflection >> @Override >> default int width() { >> return 4; >> } >> } >> >> >> public interface Float4 extends _V4 { >> >> float x(); >> float y(); >> float z(); >> float w(); >> >> @CodeReflection >> @Override >> default PrimitiveType type() { >> return JavaType.FLOAT; >> } >> >> ... >> >> } >> >> >> Note that both methods, width and type, are annotated with `@CodeReflection`. During the "dialectify" process, this approach builds the code models for both methods and inspects the meta-data values. >> >> Some restrictions: >> >> - `Float4` is not an `iFace` interface due to the small granularity. >> - Usually, these types are inspected from the kernel code, so we don't have instance objects. >> - Returning `PrimitiveType` from the `type` method allows us to be restricted in the amount of base types to support. >> >> >> How to test: >> >> For OpenCL: >> >> >> HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl hat.test.TestVectorTypes >> >> >> For CUDA: >> >> >> >> HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda hat.test.TestVectorTypes >> >> >> This PR has been tested with both OpenCL and CUDA backends. > > Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: > > [hat] Cleanup phase utils This version works with the latest version of code-reflection and the OpenCL/CUDA backends. ------------- PR Comment: https://git.openjdk.org/babylon/pull/647#issuecomment-3472153689 From jfumero at openjdk.org Fri Oct 31 09:43:43 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 09:43:43 GMT Subject: [code-reflection] Integrated: Second Proposal to generalize handling of Vector Types based on 644 In-Reply-To: References: Message-ID: <6m3L58G7sRyukDw7ixgeNyEWScfgt2YJeVU7ypAAX3w=.50304430-c7c5-4496-af52-4cf3a7a68a1f@github.com> On Tue, 28 Oct 2025 14:24:05 GMT, Juan Fumero wrote: > This PR adds another proposal for generalising HAT Vector Types. > > It is based on PR #644 as an alternative approach. So we can evaluate each proposal and device which one to move forward. > > This approach replaces the `@HATVectorType` annotation with a set of interfaces to identify base type and width of the vector type being represented. > > For instance: > > > public interface _V { > PrimitiveType type(); > int width(); > } > > public interface _V4 extends _V { > > @CodeReflection > @Override > default int width() { > return 4; > } > } > > > public interface Float4 extends _V4 { > > float x(); > float y(); > float z(); > float w(); > > @CodeReflection > @Override > default PrimitiveType type() { > return JavaType.FLOAT; > } > > ... > > } > > > Note that both methods, width and type, are annotated with `@CodeReflection`. During the "dialectify" process, this approach builds the code models for both methods and inspects the meta-data values. > > Some restrictions: > > - `Float4` is not an `iFace` interface due to the small granularity. > - Usually, these types are inspected from the kernel code, so we don't have instance objects. > - Returning `PrimitiveType` from the `type` method allows us to be restricted in the amount of base types to support. > > > How to test: > > For OpenCL: > > > HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-opencl hat.test.TestVectorTypes > > > For CUDA: > > > > HAT=SHOW_CODE,SHOW_COMPILATION_PHASES java @hat/otest ffi-cuda hat.test.TestVectorTypes > > > This PR has been tested with both OpenCL and CUDA backends. This pull request has now been integrated. Changeset: cb06b855 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/cb06b8551bcf9ca02c02023161c78a142ed70dc9 Stats: 679 lines in 24 files changed: 423 ins; 147 del; 109 mod Second Proposal to generalize handling of Vector Types based on 644 ------------- PR: https://git.openjdk.org/babylon/pull/647 From jfumero at openjdk.org Fri Oct 31 09:46:14 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 09:46:14 GMT Subject: git: openjdk/babylon: code-reflection: Second Proposal to generalize handling of Vector Types based on 644 Message-ID: <119d7bb0-7e57-4546-b1b1-b0d405d991e1@openjdk.org> Changeset: cb06b855 Branch: code-reflection Author: Juan Fumero Date: 2025-10-31 09:41:20 +0000 URL: https://git.openjdk.org/babylon/commit/cb06b8551bcf9ca02c02023161c78a142ed70dc9 Second Proposal to generalize handling of Vector Types based on 644 ! hat/core/src/main/java/hat/buffer/Float4.java = hat/core/src/main/java/hat/buffer/HATVector.java + hat/core/src/main/java/hat/dialect/HATPhaseUtils.java ! hat/core/src/main/java/hat/dialect/HATVectorAddOp.java ! hat/core/src/main/java/hat/dialect/HATVectorBinaryOp.java ! hat/core/src/main/java/hat/dialect/HATVectorDivOp.java ! hat/core/src/main/java/hat/dialect/HATVectorLoadOp.java ! hat/core/src/main/java/hat/dialect/HATVectorMakeOfOp.java ! hat/core/src/main/java/hat/dialect/HATVectorMulOp.java ! hat/core/src/main/java/hat/dialect/HATVectorOfOp.java ! hat/core/src/main/java/hat/dialect/HATVectorOp.java ! hat/core/src/main/java/hat/dialect/HATVectorSelectLoadOp.java ! hat/core/src/main/java/hat/dialect/HATVectorSelectStoreOp.java ! hat/core/src/main/java/hat/dialect/HATVectorStoreView.java ! hat/core/src/main/java/hat/dialect/HATVectorSubOp.java ! hat/core/src/main/java/hat/dialect/HATVectorVarLoadOp.java ! hat/core/src/main/java/hat/dialect/HATVectorVarOp.java ! hat/core/src/main/java/hat/phases/HATDialect.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorOpPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorSelectPhase.java ! hat/core/src/main/java/hat/phases/HATDialectifyVectorStorePhase.java + hat/core/src/main/java/hat/types/_V.java + hat/core/src/main/java/hat/types/_V4.java ! hat/tests/src/main/java/hat/test/TestVectorTypes.java From gfrost at openjdk.org Fri Oct 31 10:28:32 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 31 Oct 2025 10:28:32 GMT Subject: git: openjdk/babylon: code-reflection: Added TLDR build+run instructions to README and simplified hat.java Message-ID: Changeset: 3db08a3e Branch: code-reflection Author: Gary Frost Date: 2025-10-31 10:26:03 +0000 URL: https://git.openjdk.org/babylon/commit/3db08a3e9cfe71dba1409580c4c04c8744f98af8 Added TLDR build+run instructions to README and simplified hat.java ! hat/README.md ! hat/hat.java ! hat/hat/job.jar ! hat/hat/job/src/main/java/job/Project.java From gfrost at openjdk.org Fri Oct 31 10:29:28 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 31 Oct 2025 10:29:28 GMT Subject: [code-reflection] Integrated: Added TLDR build+run instructions to README and simplified hat.java Message-ID: Added a TLDR stanza to the README.md Also simplified the `hat.java` bld/run script. ------------- Commit messages: - Added TLDR build+run instructions to README and simplified hat.java script Changes: https://git.openjdk.org/babylon/pull/653/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=653&range=00 Stats: 118 lines in 4 files changed: 49 ins; 3 del; 66 mod Patch: https://git.openjdk.org/babylon/pull/653.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/653/head:pull/653 PR: https://git.openjdk.org/babylon/pull/653 From gfrost at openjdk.org Fri Oct 31 10:29:29 2025 From: gfrost at openjdk.org (Gary Frost) Date: Fri, 31 Oct 2025 10:29:29 GMT Subject: [code-reflection] Integrated: Added TLDR build+run instructions to README and simplified hat.java In-Reply-To: References: Message-ID: On Fri, 31 Oct 2025 10:22:23 GMT, Gary Frost wrote: > Added a TLDR stanza to the README.md > > Also simplified the `hat.java` bld/run script. This pull request has now been integrated. Changeset: 3db08a3e Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/3db08a3e9cfe71dba1409580c4c04c8744f98af8 Stats: 118 lines in 4 files changed: 49 ins; 3 del; 66 mod Added TLDR build+run instructions to README and simplified hat.java ------------- PR: https://git.openjdk.org/babylon/pull/653 From duke at openjdk.org Fri Oct 31 22:04:49 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 31 Oct 2025 22:04:49 GMT Subject: [code-reflection] RFR: Float4 arrayView support Message-ID: <973wTu2S2Qa4ZxbuDfy4LmdBrG74Zr5GIrLTldYRma8=.64c976d7-a59e-4c6f-a163-711f7bf022e4@github.com> Preliminary `Float4` support for arrayViews. Currently only supported for `F32ArrayPadded` buffers, which can be accessed like a `Float4[]` as shown below: Float4[] arr = buffer.float4ArrayView(); // for a F32ArrayPadded buffer At the moment, to use an element in the array, the `Float4` must be loaded into a separate variable first, i.e. Float4 a = arr[index * 4]; A value can be stored into the array through the following syntax: arr[index * 4] = ... ------------- Commit messages: - Cleaning up vector arrayView - Merge branch 'code-reflection' into array-view - Float4 arrayView support Changes: https://git.openjdk.org/babylon/pull/646/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=646&range=00 Stats: 1644 lines in 13 files changed: 1222 ins; 399 del; 23 mod Patch: https://git.openjdk.org/babylon/pull/646.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/646/head:pull/646 PR: https://git.openjdk.org/babylon/pull/646 From jfumero at openjdk.org Fri Oct 31 22:04:50 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 22:04:50 GMT Subject: [code-reflection] RFR: Float4 arrayView support In-Reply-To: <973wTu2S2Qa4ZxbuDfy4LmdBrG74Zr5GIrLTldYRma8=.64c976d7-a59e-4c6f-a163-711f7bf022e4@github.com> References: <973wTu2S2Qa4ZxbuDfy4LmdBrG74Zr5GIrLTldYRma8=.64c976d7-a59e-4c6f-a163-711f7bf022e4@github.com> Message-ID: On Mon, 27 Oct 2025 23:56:01 GMT, Ruby Chen wrote: > Preliminary `Float4` support for arrayViews. Currently only supported for `F32ArrayPadded` buffers, which can be accessed like a `Float4[]` as shown below: > > Float4[] arr = buffer.float4ArrayView(); // for a F32ArrayPadded buffer > > At the moment, to use an element in the array, the `Float4` must be loaded into a separate variable first, i.e. > > Float4 a = arr[index * 4]; > > A value can be stored into the array through the following syntax: > > arr[index * 4] = ... This is great work. I have a few comments/questions. All test passing also for my setup (OpenCL backend). hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java line 89: > 87: .oparen(); > 88: // if the value to be stored is an operation, recurse on the operation > 89: if (hatVectorStoreView.operands().get(1) instanceof Op.Result r && r.op() instanceof HATVectorBinaryOp) { Shouldn't this be automatically visited when `HATVectorBinaryOp` is found? Do you have the use case in which this is needed? The reason I am asking is that this also works with the prev. proposal for single Float4 loads./stores . So I wonder which pattern triggers the new check. hat/core/src/main/java/hat/phases/HATDialectifyArrayViewPhase.java line 99: > 97: switch (op) { > 98: case JavaOp.InvokeOp iop -> { > 99: if (isVectorOperation(iop)) { This HAT Phase is invoked after all vector operations have been inserted in the new code-model. So I wonder if this is actually triggered. My take is that, at this point in the compilation pipeline, all VectoLoads, Stores and VSelect are already in place. Is this correct? hat/core/src/main/java/hat/phases/HATDialectifyArrayViewPhase.java line 165: > 163: } > 164: // handles only 1D and 2D arrays > 165: case JavaOp.ArrayAccessOp.ArrayLoadOp alop -> { My take is that this phase is hitting this `case` for all the actual array view. If the prev. block still insert the dialect ops for vectors, we could substitute the prev.. pipeline of hat phases with this one. hat/core/src/main/java/hat/phases/HATDialectifyArrayViewPhase.java line 249: > 247: 4, > 248: HATVectorViewOp.VectorType.FLOAT4, > 249: false, //TODO: fix This `flag` was to indentify if the store is set to a private or shared array. In this case, we don't have a pointer. Using this search will probably work: private boolean findIsSharedOrPrivateSpace(CoreOp.VarAccessOp.VarLoadOp varLoadOp) { return findIsSharedOrPrivateSpace(varLoadOp.operands().get(0)); } private boolean findIsSharedOrPrivateSpace(Value v) { if (v instanceof Op.Result r && r.op() instanceof CoreOp.VarAccessOp.VarLoadOp varLoadOp) { return findIsSharedOrPrivateSpace(varLoadOp); } else if (v instanceof CoreOp.Result r && (r.op() instanceof HATLocalVarOp || r.op() instanceof HATPrivateVarOp)) { return true; }else{ return false; } } I think in the future we can add a new Op for expressing global array accesses too (from parameters), so we can simplify how we handle different levels of memory within the code gen. ------------- PR Review: https://git.openjdk.org/babylon/pull/646#pullrequestreview-3386912390 PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2468120990 PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2468126202 PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2468131031 PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2468143307 From jfumero at openjdk.org Fri Oct 31 22:04:50 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 22:04:50 GMT Subject: [code-reflection] RFR: Float4 arrayView support In-Reply-To: References: <973wTu2S2Qa4ZxbuDfy4LmdBrG74Zr5GIrLTldYRma8=.64c976d7-a59e-4c6f-a163-711f7bf022e4@github.com> Message-ID: <3yJGeHdP2iNHaFCBvwLX8TeQfCBNUX52jr-B1gUAW7U=.5a705205-3afd-40ba-86d0-757533c6dd65@github.com> On Tue, 28 Oct 2025 06:50:35 GMT, Juan Fumero wrote: >> Preliminary `Float4` support for arrayViews. Currently only supported for `F32ArrayPadded` buffers, which can be accessed like a `Float4[]` as shown below: >> >> Float4[] arr = buffer.float4ArrayView(); // for a F32ArrayPadded buffer >> >> At the moment, to use an element in the array, the `Float4` must be loaded into a separate variable first, i.e. >> >> Float4 a = arr[index * 4]; >> >> A value can be stored into the array through the following syntax: >> >> arr[index * 4] = ... > > hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java line 89: > >> 87: .oparen(); >> 88: // if the value to be stored is an operation, recurse on the operation >> 89: if (hatVectorStoreView.operands().get(1) instanceof Op.Result r && r.op() instanceof HATVectorBinaryOp) { > > Shouldn't this be automatically visited when `HATVectorBinaryOp` is found? Do you have the use case in which this is needed? The reason I am asking is that this also works with the prev. proposal for single Float4 loads./stores . So I wonder which pattern triggers the new check. We will need to propagate this change also for the CUDA codegen. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2468132770 From duke at openjdk.org Fri Oct 31 22:04:51 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 31 Oct 2025 22:04:51 GMT Subject: [code-reflection] RFR: Float4 arrayView support In-Reply-To: <3yJGeHdP2iNHaFCBvwLX8TeQfCBNUX52jr-B1gUAW7U=.5a705205-3afd-40ba-86d0-757533c6dd65@github.com> References: <973wTu2S2Qa4ZxbuDfy4LmdBrG74Zr5GIrLTldYRma8=.64c976d7-a59e-4c6f-a163-711f7bf022e4@github.com> <3yJGeHdP2iNHaFCBvwLX8TeQfCBNUX52jr-B1gUAW7U=.5a705205-3afd-40ba-86d0-757533c6dd65@github.com> Message-ID: <_1u5TCXLpIlETxYZXIJsMCbZWjmXqMSTsW6L2aX2Kds=.4b7facb0-fe56-4c6d-9d7f-edb88a00b319@github.com> On Tue, 28 Oct 2025 06:56:53 GMT, Juan Fumero wrote: >> hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLHATKernelBuilder.java line 89: >> >>> 87: .oparen(); >>> 88: // if the value to be stored is an operation, recurse on the operation >>> 89: if (hatVectorStoreView.operands().get(1) instanceof Op.Result r && r.op() instanceof HATVectorBinaryOp) { >> >> Shouldn't this be automatically visited when `HATVectorBinaryOp` is found? Do you have the use case in which this is needed? The reason I am asking is that this also works with the prev. proposal for single Float4 loads./stores . So I wonder which pattern triggers the new check. > > We will need to propagate this change also for the CUDA codegen. Good point; currently, a line like `vC[index * 4] = Float4.add(vA[index * 4], vB[index * 4])` won't be handled properly (the add operation won't be recursed over, and the resulting code will look like `vstore4(vA, 0, &c->array[index*4])` instead of storing the add operation's result). (Edit: I originally thought that if we extracted the array accesses `vA[index * 4]` and `vB[index * 4]` into Float4 variables first before operating on them, the original code would work, but it doesn't seem to be the case) There might also be something I'm missing that causes a case like `vC[index * 4] = Float4.add(vA[index * 4], vB[index * 4])` to fail with the original code; I'll give it another pass. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2470395187 From jfumero at openjdk.org Fri Oct 31 22:04:52 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 22:04:52 GMT Subject: [code-reflection] RFR: Float4 arrayView support In-Reply-To: <_1u5TCXLpIlETxYZXIJsMCbZWjmXqMSTsW6L2aX2Kds=.4b7facb0-fe56-4c6d-9d7f-edb88a00b319@github.com> References: <973wTu2S2Qa4ZxbuDfy4LmdBrG74Zr5GIrLTldYRma8=.64c976d7-a59e-4c6f-a163-711f7bf022e4@github.com> <3yJGeHdP2iNHaFCBvwLX8TeQfCBNUX52jr-B1gUAW7U=.5a705205-3afd-40ba-86d0-757533c6dd65@github.com> <_1u5TCXLpIlETxYZXIJsMCbZWjmXqMSTsW6L2aX2Kds=.4b7facb0-fe56-4c6d-9d7f-edb88a00b319@github.com> Message-ID: <43Eu8jrIPnMBuk4UM-_IiUqu9OmwlI2uCW6o-fZL4U4=.b81319e7-4f83-45a7-ba86-41892179b47c@github.com> On Tue, 28 Oct 2025 17:16:23 GMT, Ruby Chen wrote: >> We will need to propagate this change also for the CUDA codegen. > > Good point; currently, a line like `vC[index * 4] = Float4.add(vA[index * 4], vB[index * 4])` won't be handled properly (the add operation won't be recursed over, and the resulting code will look like `vstore4(vA, 0, &c->array[index*4])` instead of storing the add operation's result). > > (Edit: I originally thought that if we extracted the array accesses `vA[index * 4]` and `vB[index * 4]` into Float4 variables first before operating on them, the original code would work, but it doesn't seem to be the case) > > There might also be something I'm missing that causes a case like `vC[index * 4] = Float4.add(vA[index * 4], vB[index * 4])` to fail with the original code; I'll give it another pass. Ok, got it. Thanks for the clarification. So it looks to me that possibly there are some missing `HATVectorVarLoadOps` in this case. For example: `Float4.add(vA[index * 4], vB[index * 4])`, would have two `HATVectorVarLoadOp` loading a `float4`. But I get now, with the array views, we will see actually two plain arrays being loaded. So if that's the case, it makes sense to invoke `recurse`. I am not suggesting to use `HATVectorVarLoadOp`, but it is good we have the cases identified. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2472182044 From duke at openjdk.org Fri Oct 31 22:04:54 2025 From: duke at openjdk.org (Ruby Chen) Date: Fri, 31 Oct 2025 22:04:54 GMT Subject: [code-reflection] RFR: Float4 arrayView support In-Reply-To: References: <973wTu2S2Qa4ZxbuDfy4LmdBrG74Zr5GIrLTldYRma8=.64c976d7-a59e-4c6f-a163-711f7bf022e4@github.com> Message-ID: On Tue, 28 Oct 2025 06:53:27 GMT, Juan Fumero wrote: >> Preliminary `Float4` support for arrayViews. Currently only supported for `F32ArrayPadded` buffers, which can be accessed like a `Float4[]` as shown below: >> >> Float4[] arr = buffer.float4ArrayView(); // for a F32ArrayPadded buffer >> >> At the moment, to use an element in the array, the `Float4` must be loaded into a separate variable first, i.e. >> >> Float4 a = arr[index * 4]; >> >> A value can be stored into the array through the following syntax: >> >> arr[index * 4] = ... > > hat/core/src/main/java/hat/phases/HATDialectifyArrayViewPhase.java line 99: > >> 97: switch (op) { >> 98: case JavaOp.InvokeOp iop -> { >> 99: if (isVectorOperation(iop)) { > > This HAT Phase is invoked after all vector operations have been inserted in the new code-model. So I wonder if this is actually triggered. My take is that, at this point in the compilation pipeline, all VectoLoads, Stores and VSelect are already in place. Is this correct? That's correct; this is leftover from when I was testing earlier haha. Good catch! > hat/core/src/main/java/hat/phases/HATDialectifyArrayViewPhase.java line 165: > >> 163: } >> 164: // handles only 1D and 2D arrays >> 165: case JavaOp.ArrayAccessOp.ArrayLoadOp alop -> { > > My take is that this phase is hitting this `case` for all the actual array view. If the prev. block still insert the dialect ops for vectors, we could substitute the prev.. pipeline of hat phases with this one. Oh interesting, are you proposing combining some of the hat phases into one larger overall phase using this `case` logic? ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2470578540 PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2470585428 From jfumero at openjdk.org Fri Oct 31 22:04:56 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Fri, 31 Oct 2025 22:04:56 GMT Subject: [code-reflection] RFR: Float4 arrayView support In-Reply-To: References: <973wTu2S2Qa4ZxbuDfy4LmdBrG74Zr5GIrLTldYRma8=.64c976d7-a59e-4c6f-a163-711f7bf022e4@github.com> Message-ID: On Tue, 28 Oct 2025 18:13:01 GMT, Ruby Chen wrote: >> hat/core/src/main/java/hat/phases/HATDialectifyArrayViewPhase.java line 165: >> >>> 163: } >>> 164: // handles only 1D and 2D arrays >>> 165: case JavaOp.ArrayAccessOp.ArrayLoadOp alop -> { >> >> My take is that this phase is hitting this `case` for all the actual array view. If the prev. block still insert the dialect ops for vectors, we could substitute the prev.. pipeline of hat phases with this one. > > Oh interesting, are you proposing combining some of the hat phases into one larger overall phase using this `case` logic? If the whole logic works, then yes, we can condense it in one phase. I personally prefer different compiler phases, so if something goes wrong, or we find a new use-case that does not match the patterns for one of the phases, we can easily detect phases involved. But not strong opinion. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/646#discussion_r2472259888