Skip to content

Failed to build af_cuda x64 target on MSVS 2017 #2922

@laser101

Description

@laser101

Hi,

My attempts to build v3.7.1 on MSVS 2017 failed, but I noted that the related issue (constexpr not supported) was address in commit ce85175 (20 April 2020).

As a potential workaround, I checked out 90e6553 (3 June 2020) from the master branch but this also fails to build. Specifically, the af_cuda target fails with two errors (abridged):

arrayfire\src\backend\cuda\ThrustArrayFirePolicy.hpp(38): error : expression must have class type
arrayfire\src\backend\cuda\ThrustArrayFirePolicy.hpp(38): error : no instance of function template "cuda::memFree" matches the argument list

I appreciate that this is not a formal release, so please disregard if this is a known issue.

Russ

The complete error messages are included here...

50>\git\arrayfire\src\backend\cuda\ThrustArrayFirePolicy.hpp(38): error : expression must have class type
50>          detected during:
50>            instantiation of "void cuda::return_temporary_buffer(cuda::ThrustArrayFirePolicy, Pointer) [with Pointer=void *]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/detail/temporary_buffer.h(74): here
50>            instantiation of "void thrust::return_temporary_buffer(const thrust::detail::execution_policy_base<DerivedPolicy> &, Pointer) [with DerivedPolicy=cuda::ThrustArrayFirePolicy, Pointer=void *]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/memory_buffer.h(65): here
50>            instantiation of "void thrust::cuda_cub::return_memory_buffer(thrust::cuda_cub::execution_policy<Derived> &, void *) [with Derived=cuda::ThrustArrayFirePolicy]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/sort.h(1530): here
50>            instantiation of "void thrust::cuda_cub::__radix_sort::radix_sort<SORT_ITEMS,Policy,Key,Item,Size,CompareOp>(Policy &, Key *, Item *, Size, CompareOp) [with SORT_ITEMS=thrust::detail::true_type, Policy=thrust::cuda_cub::execution_policy<cuda::ThrustArrayFirePolicy>, Key=float, Item=float, Size=long long, CompareOp=thrust::less<float>]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/sort.h(1611): here
50>            instantiation of "thrust::cuda_cub::__smart_sort::enable_if_primitive_sort<KeysIt, CompareOp>::type thrust::cuda_cub::__smart_sort::smart_sort<SORT_ITEMS,STABLE,Policy,KeysIt,ItemsIt,CompareOp>(thrust::cuda_cub::execution_policy<Policy> &, KeysIt, KeysIt, ItemsIt, CompareOp) [with SORT_ITEMS=thrust::detail::true_type, STABLE=thrust::detail::true_type, Policy=cuda::ThrustArrayFirePolicy, KeysIt=float *, ItemsIt=float *, CompareOp=thrust::less<float>]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/sort.h(1724): here
50>            instantiation of "void thrust::cuda_cub::stable_sort_by_key(thrust::cuda_cub::execution_policy<Derived> &, KeysIt, KeysIt, ValuesIt, CompareOp) [with Derived=cuda::ThrustArrayFirePolicy, KeysIt=float *, ValuesIt=float *, CompareOp=thrust::less<float>]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/sort.h(1774): here
50>            instantiation of "void thrust::cuda_cub::stable_sort_by_key(thrust::cuda_cub::execution_policy<Derived> &, KeysIt, KeysIt, ValuesIt) [with Derived=cuda::ThrustArrayFirePolicy, KeysIt=float *, ValuesIt=float *]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/detail/sort.inl(130): here
50>            instantiation of "void thrust::stable_sort_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator1, RandomAccessIterator1, RandomAccessIterator2) [with DerivedPolicy=cuda::ThrustArrayFirePolicy, RandomAccessIterator1=float *, RandomAccessIterator2=float *]"
50>\git\arrayfire\src\backend\cuda\kernel/thrust_sort_by_key_impl.hpp(22): here
50>            instantiation of "void cuda::kernel::thrustSortByKey(Tk *, Tv *, int, __nv_bool) [with Tk=float, Tv=float]"
50>/git/arrayfire/build/src/backend/cuda/kernel/thrust_sort_by_key/thrust_sort_by_key_impl_float_0.cu(20): here
50>
50>\git\arrayfire\src\backend\cuda\ThrustArrayFirePolicy.hpp(38): error : no instance of function template "cuda::memFree" matches the argument list
50>            argument types are: (<error-type>)
50>          detected during:
50>            instantiation of "void cuda::return_temporary_buffer(cuda::ThrustArrayFirePolicy, Pointer) [with Pointer=void *]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/detail/temporary_buffer.h(74): here
50>            instantiation of "void thrust::return_temporary_buffer(const thrust::detail::execution_policy_base<DerivedPolicy> &, Pointer) [with DerivedPolicy=cuda::ThrustArrayFirePolicy, Pointer=void *]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/memory_buffer.h(65): here
50>            instantiation of "void thrust::cuda_cub::return_memory_buffer(thrust::cuda_cub::execution_policy<Derived> &, void *) [with Derived=cuda::ThrustArrayFirePolicy]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/sort.h(1530): here
50>            instantiation of "void thrust::cuda_cub::__radix_sort::radix_sort<SORT_ITEMS,Policy,Key,Item,Size,CompareOp>(Policy &, Key *, Item *, Size, CompareOp) [with SORT_ITEMS=thrust::detail::true_type, Policy=thrust::cuda_cub::execution_policy<cuda::ThrustArrayFirePolicy>, Key=float, Item=float, Size=long long, CompareOp=thrust::less<float>]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/sort.h(1611): here
50>            instantiation of "thrust::cuda_cub::__smart_sort::enable_if_primitive_sort<KeysIt, CompareOp>::type thrust::cuda_cub::__smart_sort::smart_sort<SORT_ITEMS,STABLE,Policy,KeysIt,ItemsIt,CompareOp>(thrust::cuda_cub::execution_policy<Policy> &, KeysIt, KeysIt, ItemsIt, CompareOp) [with SORT_ITEMS=thrust::detail::true_type, STABLE=thrust::detail::true_type, Policy=cuda::ThrustArrayFirePolicy, KeysIt=float *, ItemsIt=float *, CompareOp=thrust::less<float>]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/sort.h(1724): here
50>            instantiation of "void thrust::cuda_cub::stable_sort_by_key(thrust::cuda_cub::execution_policy<Derived> &, KeysIt, KeysIt, ValuesIt, CompareOp) [with Derived=cuda::ThrustArrayFirePolicy, KeysIt=float *, ValuesIt=float *, CompareOp=thrust::less<float>]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/system/cuda/detail/sort.h(1774): here
50>            instantiation of "void thrust::cuda_cub::stable_sort_by_key(thrust::cuda_cub::execution_policy<Derived> &, KeysIt, KeysIt, ValuesIt) [with Derived=cuda::ThrustArrayFirePolicy, KeysIt=float *, ValuesIt=float *]"
50>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\thrust/detail/sort.inl(130): here
50>            instantiation of "void thrust::stable_sort_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &, RandomAccessIterator1, RandomAccessIterator1, RandomAccessIterator2) [with DerivedPolicy=cuda::ThrustArrayFirePolicy, RandomAccessIterator1=float *, RandomAccessIterator2=float *]"
50>\git\arrayfire\src\backend\cuda\kernel/thrust_sort_by_key_impl.hpp(22): here
50>            instantiation of "void cuda::kernel::thrustSortByKey(Tk *, Tv *, int, __nv_bool) [with Tk=float, Tv=float]"
50>/git/arrayfire/build/src/backend/cuda/kernel/thrust_sort_by_key/thrust_sort_by_key_impl_float_0.cu(20): here
50>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions