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

Use std::size_t for requested scratch allocations in GPU backends #4551

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

masterleinad
Copy link
Contributor

In #4532, it turned out that some test cases needed the allocation size for scratch space to be larger than ExecutionSpace::size_type. This pull request tries to make the change from ExecutionSpace::size_type to std::size_t more uniform across CUDA, HIP and SYCL.

@dalg24 dalg24 requested a review from Rombur November 23, 2021 18:07
Copy link
Contributor

@cz4rs cz4rs left a comment

Choose a reason for hiding this comment

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

see below (this comment cannot be deleted)

Copy link
Contributor

@cz4rs cz4rs left a comment

Choose a reason for hiding this comment

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

scratch_unified definition was not updated:

/var/jenkins/workspace/Kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp:623:32: error: out-of-line definition of 'scratch_unified' does not match any declaration in 'Kokkos::Impl::CudaInternal' [clang-diagnostic-error]

Cuda::size_type *CudaInternal::scratch_unified(

                               ^

Also these look to be mismatched:

CudaSpace::size_type* cuda_internal_scratch_flags(
const Cuda&, const CudaSpace::size_type size);
CudaSpace::size_type* cuda_internal_scratch_space(
const Cuda&, const CudaSpace::size_type size);
CudaSpace::size_type* cuda_internal_scratch_unified(
const Cuda&, const CudaSpace::size_type size);

Otherwise looks good to me.

@masterleinad masterleinad force-pushed the scratch_size_t_gpu branch 3 times, most recently from 4734a5d to c43dc8a Compare November 24, 2021 19:00
@crtrott crtrott merged commit e39bf59 into kokkos:develop Nov 30, 2021
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

5 participants