Skip to content

[hat] Enable vendor information to be pass to the code-generators#1006

Open
jjfumero wants to merge 4 commits intoopenjdk:code-reflectionfrom
jjfumero:hat/vendor/ffi
Open

[hat] Enable vendor information to be pass to the code-generators#1006
jjfumero wants to merge 4 commits intoopenjdk:code-reflectionfrom
jjfumero:hat/vendor/ffi

Conversation

@jjfumero
Copy link
Copy Markdown
Member

@jjfumero jjfumero commented Apr 13, 2026

This PR enables vendor information to be used in the code generators.

All tests must pass:

java -cp hat/job.jar hat.java test-suite ffi-opencl
java -cp hat/job.jar hat.java test-suite ffi-cuda


Progress

  • Change must not contain extraneous whitespace

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/1006/head:pull/1006
$ git checkout pull/1006

Update a local copy of the PR:
$ git checkout pull/1006
$ git pull https://git.openjdk.org/babylon.git pull/1006/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1006

View PR using the GUI difftool:
$ git pr show -t 1006

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/1006.diff

Using Webrev

Link to Webrev Comment

@jjfumero jjfumero requested a review from grfrost April 13, 2026 10:19
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Apr 13, 2026

👋 Welcome back jfumero! A progress list of the required criteria for merging this PR into code-reflection will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 13, 2026

@jjfumero This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

[hat] Enable vendor information to be pass to the code-generators

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the code-reflection branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the code-reflection branch, type /integrate in a new comment.

@jjfumero
Copy link
Copy Markdown
Member Author

/template append

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 13, 2026

@jjfumero The pull request template has been appended to the pull request body


public Vendor getDeviceVendor() {
MemorySegment vendorNameSegment = getVendorFunction.invoke(handle);
long sizeString = stringFunctionLength.invoke(vendorNameSegment);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We created a memorySegment just for the Vendor Name?

Maybe we can create a MemorSegment with some structure. To receive other vendor info later.

So maybe a MemorySegment containing a list of Name/Value/Type triples

We can a MappedMemorySegment then for all values....

Copy link
Copy Markdown
Collaborator

@grfrost grfrost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might take this opportunity to provide a mechanism for retrieving future vendor/device/status information using a single MemorySegment mapped to an IfaceMapped segment.

@openjdk openjdk Bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 13, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented Apr 13, 2026

Webrevs

@jjfumero jjfumero self-assigned this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants