Skip to content

Implement calling of Futhark Server programs from the interpreter#2399

Open
vox9 wants to merge 18 commits into
diku-dk:masterfrom
vox9:ffi-eval-only
Open

Implement calling of Futhark Server programs from the interpreter#2399
vox9 wants to merge 18 commits into
diku-dk:masterfrom
vox9:ffi-eval-only

Conversation

@vox9

@vox9 vox9 commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

I added ugly starter code. Please don't roast me too hard, I prefer my meat medium rare.

@vox9

vox9 commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator Author

At the time being, most utility functions of the interpreter are unsupported. This will change, when I have the time to do so. Furthermore, primitive values stored anywhere inside arrays are lazy pulled from the server. Right now, you have to force that by performing a binary operation on them in the end. This should be an easy fix, but not tonight :)

@athas

athas commented Mar 17, 2026

Copy link
Copy Markdown
Member

This deserves a closer look than I have time for today. However, I am somewhat suspicious of the three modules added to Futhark.Util, as I do not envision they will actually ever be used outside the interpreter. I don't think anything is gained by making them look more general than they really are, and I would strongly prefer moving them under the Language.Futhark.Interpreter hierarchy, to emphasize that this is their home (I also have a long-term dream of separating the interpreter further from the compiler, but let's not worry too much about that).

@athas

athas commented Mar 17, 2026

Copy link
Copy Markdown
Member

Also, run the formatter and kill the warnings. I won't do that here, because that would probably result in ruinous conflicts with your own upstream code.

Comment thread src/Language/Futhark/Interpreter.hs Outdated
@athas

athas commented Mar 18, 2026

Copy link
Copy Markdown
Member

Actually I am going to reformat this and fix all the warnings, because there are other things I also want to modify. Make sure to pull after that.

@athas

athas commented Mar 18, 2026

Copy link
Copy Markdown
Member

Reformat done. I also fixed some warnings while I was at it.

@athas

athas commented Mar 18, 2026

Copy link
Copy Markdown
Member

I have beefed up the futhark eval user experience significantly. Note that it now only uses compiled code when --backend is passed.

@vox9

vox9 commented Mar 18, 2026

Copy link
Copy Markdown
Collaborator Author

Looking good, but remember that only the C server currently supports all the necessary commands.

@athas

athas commented Mar 18, 2026

Copy link
Copy Markdown
Member

That is the only one that matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants