Skip to content

[BUG]: namespace "thrust" has no member "transform_reduce" #5061

@imgaojun

Description

@imgaojun

🐛 Describe the bug

Hello, I have encountered a problem while compiling ColossalAI within the Docker nvcr.io/nvidia/pytorch:23.07-py3. The error message is as follows:

nvcc warning : incompatible redefinition for option 'std', the last value of this option was used
/workspace/ColossalAI/colossalai/kernel/cuda_native/csrc/kernels/cuda_util.cu(148): error: namespace "thrust" has no member "transform_reduce"
res = thrust::transform_reduce(thrust::cuda::par.on(stream), data_ptr,
^

/workspace/ColossalAI/colossalai/kernel/cuda_native/csrc/kernels/cuda_util.cu(153): error: namespace "thrust" has no member "transform_reduce"
res = thrust::transform_reduce(thrust::cuda::par.on(stream), data_ptr,
^

2 errors detected in the compilation of "/workspace/ColossalAI/colossalai/kernel/cuda_native/csrc/kernels/cuda_util.cu".

From what I understand, it seems that the namespace "thrust" does not contain the member "transform_reduce". One potential solution I found is to include <thrust/transform_reduce.h> in the ColossalAI/colossalai/kernel/cuda_native/csrc/kernels/cuda_util.cu file.

Could you please help verify this solution or suggest any other potential fixes?

image

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions