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

[BUG]: thrust::host_vector with universal_host_pinned_memory_resource uses a kernel to initialize memory #1192

Open
1 task done
fkallen opened this issue Dec 7, 2023 · 0 comments
Labels
bug Something isn't working right.

Comments

@fkallen
Copy link

fkallen commented Dec 7, 2023

Is this a duplicate?

Type of Bug

Something else

Component

Thrust

Describe the bug

The profiler shows that the following code executes a kernel.

[5/7] Executing 'cuda_gpu_kern_sum' stats report

 Time (%)  Total Time (ns)  Instances  Avg (ns)   Med (ns)   Min (ns)  Max (ns)  StdDev (ns)                                                  Name                                                
 --------  ---------------  ---------  ---------  ---------  --------  --------  -----------  ----------------------------------------------------------------------------------------------------
    100,0          320.130          1  320.130,0  320.130,0   320.130   320.130          0,0  void thrust::cuda_cub::core::_kernel_agent<thrust::cuda_cub::__parallel_for::ParallelForAgent<thrus

How to Reproduce

//nvcc 12.3 , nvcc test.cu -o test

#include <thrust/mr/universal_memory_resource.h>
#include <thrust/mr/allocator.h>
#include <thrust/host_vector.h>

int main(){
    using Allocator = thrust::mr::stateless_resource_allocator<
        int, thrust::universal_host_pinned_memory_resource>;

    thrust::host_vector<int, Allocator> vec(1024*1024);
}

Expected behavior

I expect the host to initialize the memory to avoid pcie transfer.

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@fkallen fkallen added the bug Something isn't working right. label Dec 7, 2023
@github-project-automation github-project-automation bot moved this to Todo in CCCL Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right.
Projects
Status: Todo
Development

No branches or pull requests

1 participant