-
Notifications
You must be signed in to change notification settings - Fork 0
Add Julia interface for cuPDLPx #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
There's a lot of stuff there. You should wrap only the public C API. What functions is the user expected to call? |
| end | ||
|
|
||
| function read_mps_file(filename) | ||
| ccall((:read_mps_file, libcupdlpx), Ptr{lp_problem_t}, (Ptr{Cchar},), filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But stuff like this should be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m a bit confused here. Since the goal of this API is to interact with JuMP, do we still need this functionality, given that JuMP already provides the read_from_file function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This falls into the question of "what is your public API?"
People might want to interact with cuPDLPx directly, from Julia, and without JuMP.
Something like:
using cuPDLPx
model = cuPDLPx.read_mps_file(filename)
cuPDLPx.optimize(model)
x = cuPDLPx.get_solution(model)(Or whatever, I don't know the C API functions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the input, @odow. That’s a good point — we may need to reorganize the C API functions in cuPDLPx.
|
Thank you so much for the suggestion, @odow. I wasn’t very familiar with Clang.jl before — I’ll make sure to wrap only the public C API.
|
| @@ -0,0 +1,2 @@ | |||
| # This file will be inserted automatically at the top of LibcuPDLPx.jl | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to be the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line doesn't seem to be included in the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this.
|
I'm seeing generated names like |
Desciption
This PR adds the Julia interface for cuPDLPx, a GPU-accelerated first-order LP solver.
Below is an example output from the current code generation workflow.
Any feedback or suggestions from the Julia or JuMP community would be greatly appreciated. @odow @blegat