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

Some fixes to run profiling on gpu #8

Merged
merged 3 commits into from
Dec 15, 2020
Merged

Some fixes to run profiling on gpu #8

merged 3 commits into from
Dec 15, 2020

Conversation

kibaekkim
Copy link
Member

No description provided.

@kibaekkim kibaekkim mentioned this pull request Dec 15, 2020
Copy link
Member

@frapac frapac left a comment

Choose a reason for hiding this comment

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

Looks good overall!

l = CuArray(l)
end

eval_f(x) = 0.5 * x' * P * x + q' * x
Copy link
Member

Choose a reason for hiding this comment

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

for benchmarking purpose, I would maybe use a non-allocation version of eval_f, to ensure we do not allocate any additional array on the GPU.

@@ -11,7 +11,7 @@ const BLAS_LIBRARY = :Tron
const EXATRON_LIBRARY = "libtron"

has_c_library() = !isnothing(Libdl.dlopen(EXATRON_LIBRARY; throw_error=false))
tron_zeros(S, n) = fill!(S(undef, n), zero(eltype(S)))
tron_zeros(S, n) = fill!(S(undef, Int64(n)), zero(eltype(S)))
Copy link
Member

Choose a reason for hiding this comment

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

I would maybe replace Int64 by Int (I remember some issues with Int64 on 32 bits architecture)

@youngdae youngdae merged commit 271e99b into main Dec 15, 2020
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

3 participants