Skip to content
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

[CUSOLVER] Add a structure CuSolverParameters fro the generic API #2188

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

amontoison
Copy link
Member

@maleadt I'm wondering if we should provide the new structure CuSolverParameters as a keyword argument such that the users can provide different parameters if they want.
We can only use the default parameters with the current implementation.

function Xpotrf!(uplo::Char, A::StridedCuMatrix{T}; parameters::CuSolverParameters=CuSolverParameters()) where {T <: BlasFloat}
  ...
end

What do you think?

@maleadt
Copy link
Member

maleadt commented Dec 11, 2023

I'm wondering if we should provide the new structure CuSolverParameters as a keyword argument such that the users can provide different parameters if they want.

Do these parameters apply to multiple CUSOLVER calls? If it's more like the CUBLAS math mode, we may want to do something task-local instead (or using dynamically scoped values at some later point).

@amontoison
Copy link
Member Author

Multiple CUSOLVER routines are concerned by this parameter structure but it's not like the CUBLAS math mode because each CUSOLVER routine requires it as an argument.
The parameters also depend on the CUSOLVER routine:

What is very similar to the CUBLAS math mode in CUSOLVER is the deterministic mode:

@maleadt
Copy link
Member

maleadt commented Dec 12, 2023

each CUSOLVER routine requires it as an argument

That doesn't matter; the wrappers could query the task-local value and pass it to every API, just like we pass stream(). If it's a single or unified parameter that's used across APIs though, I think it's better to store it globally instead of having to pass it to every CUSOLVER.jl function.

@amontoison
Copy link
Member Author

@maleadt I think that we can merge the PR like this for now.

@maleadt maleadt merged commit b6a4efb into JuliaGPU:master Jan 4, 2024
1 check passed
@amontoison amontoison deleted the cusolver_parameters branch January 4, 2024 19:07
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.

None yet

2 participants