Skip to content

Error while compiling examples on HAL with version 7.0 of hip #303

Done

Description

@saeedelsayed

here is the error message:

/mallocMC/include/mallocMC/creationPolicies/Scatter.hpp:916:43: error: call to 'popcount' is ambiguous 916 | uint32_t const local_id = alpaka::popcount(acc, lanemask & mask);

and this is the complete output:

/mallocMC/build$ make mallocMCExamples
-- CPM: Adding package alpaka@0 (95c0bf2397255a89467bb5c151a96367ad1d1f93)
CMake Warning (dev) at build/_deps/alpaka-src/cmake/alpakaCommon.cmake:239 (find_package):
Policy CMP0144 is not set: find_package uses upper-case _ROOT
variables. Run "cmake --help-policy CMP0144" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

Environment variable BOOST_ROOT is set to:

/home/spack-modules/opt/spack/linux-zen2/boost-1.88.0-wbqgcedr5hxyvpdcehfszupq43g5uss6

For compatibility, find_package is ignoring the variable, but code in a
.cmake module might still use it.
Call Stack (most recent call first):
build/_deps/alpaka-src/CMakeLists.txt:96 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at build/_deps/alpaka-src/cmake/alpakaCommon.cmake:239 (find_package):
Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake
--help-policy CMP0167" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

Call Stack (most recent call first):
build/_deps/alpaka-src/CMakeLists.txt:96 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at build/_deps/alpaka-src/cmake/alpakaCommon.cmake:615 (message):
HIP 7.0 is not official supported by alpaka. Supported versions: 5.1 - 6.2
Call Stack (most recent call first):
build/_deps/alpaka-src/CMakeLists.txt:96 (include)

-- alpaka_ACC_GPU_HIP_ENABLED

List of compiler flags added by alpaka
host compiler:
$&lt;$&lt;AND:$CONFIG:Debug,$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CXX>>:SHELL:-Og>;$<$<AND:$CONFIG:Debug,$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CUDA>>:SHELL:-Xcompiler -Og>;$<$<AND:$CONFIG:Debug,$<CXX_COMPILER_ID:Clang,AppleClang,IntelLLVM>>:SHELL:-O0>;$<$<AND:$CONFIG:Debug,$<CXX_COMPILER_ID:MSVC>>:SHELL:/Od>;$<$<COMPILE_LANGUAGE:CXX>:-D__HIP_PLATFORM_AMD__>
device compiler:
$&lt;$&lt;AND:$CONFIG:Debug,$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CXX>>:SHELL:-Og>;$<$<AND:$CONFIG:Debug,$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CUDA>>:SHELL:-Xcompiler -Og>;$<$<AND:$CONFIG:Debug,$<CXX_COMPILER_ID:Clang,AppleClang,IntelLLVM>>:SHELL:-O0>;$<$<AND:$CONFIG:Debug,$<CXX_COMPILER_ID:MSVC>>:SHELL:/Od>;$<$<COMPILE_LANGUAGE:CXX>:-D__HIP_PLATFORM_AMD__>

There already exists a target for dependency alpaka. Not addding alpaka for mallocMC again.
There already exists a target for dependency alpaka. Not addding alpaka for mallocMC again.
-- Configuring done (0.9s)
-- Generating done (0.0s)
-- Build files have been written to: /home/shamse09/mallocMC/build
[ 20%] Building HIP object examples/getAvailableSlots/CMakeFiles/mallocMCExampleGetAvailableSlots.dir/source/main.cpp.o
In file included from /home/shamse09/mallocMC/examples/getAvailableSlots/source/main.cpp:35:
In file included from /home/shamse09/mallocMC/include/mallocMC/mallocMC.hpp:44:
In file included from /home/shamse09/mallocMC/include/mallocMC/mallocMC_hostclass.hpp:31:
In file included from /home/shamse09/mallocMC/include/mallocMC/allocator.hpp:34:
In file included from /home/shamse09/mallocMC/include/mallocMC/mallocMC_constraints.hpp:32:
In file included from /home/shamse09/mallocMC/include/mallocMC/creationPolicies/Scatter.hpp:37:
/home/shamse09/mallocMC/include/mallocMC/creationPolicies/../mallocMC_utils.hpp:71:68: warning: macro '__AMDGCN_WAVEFRONT_SIZE' has been marked as deprecated: compile-time-constant access to the wavefront size will be removed in a future release [-Wdeprecated-pragma]
71 | constexpr uint32_t warpSize<alpaka::AccGpuHipRt<TDim, TIdx>> = __AMDGCN_WAVEFRONT_SIZE;
| ^
:935:139: note: macro marked 'deprecated' here
935 | #pragma clang deprecated(__AMDGCN_WAVEFRONT_SIZE, "compile-time-constant access to the wavefront size will be removed in a future release")
| ^
In file included from /home/shamse09/mallocMC/examples/getAvailableSlots/source/main.cpp:35:
In file included from /home/shamse09/mallocMC/include/mallocMC/mallocMC.hpp:44:
In file included from /home/shamse09/mallocMC/include/mallocMC/mallocMC_hostclass.hpp:31:
In file included from /home/shamse09/mallocMC/include/mallocMC/allocator.hpp:34:
In file included from /home/shamse09/mallocMC/include/mallocMC/mallocMC_constraints.hpp:32:
/home/shamse09/mallocMC/include/mallocMC/creationPolicies/Scatter.hpp:916:43: error: call to 'popcount' is ambiguous
916 | uint32_t const local_id = alpaka::popcount(acc, lanemask & mask);
| ^~~~~~~~~~~~~~~~
/home/shamse09/mallocMC/include/mallocMC/creationPolicies/Scatter.hpp:966:28: note: in instantiation of function template specialization 'mallocMC::CreationPolicies::ScatterImpl<FlatterScatterHeapConfig, mallocMC::CreationPolicies::ScatterConf::DefaultScatterHashingParams, mallocMC::AlignmentPolicies::Shrink>::allocPageBased<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>' requested here
966 | return allocPageBased(acc, bytes);
| ^
/home/shamse09/mallocMC/include/mallocMC/device_allocator.hpp:80:96: note: in instantiation of function template specialization 'mallocMC::CreationPolicies::ScatterImpl<FlatterScatterHeapConfig, mallocMC::CreationPolicies::ScatterConf::DefaultScatterHashingParams, mallocMC::AlignmentPolicies::Shrink>::create<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>' requested here
80 | void* memBlock = CreationPolicy::template AlignmentAwarePolicy<T_AlignmentPolicy>::create(acc, req_size);
| ^
/home/shamse09/mallocMC/include/mallocMC/mallocMC_allocator_handle.hpp:45:34: note: in instantiation of function template specialization 'mallocMC::DeviceAllocator<mallocMC::CreationPolicies::ScatterImpl<FlatterScatterHeapConfig, mallocMC::CreationPolicies::ScatterConf::DefaultScatterHashingParams, mallocMC::AlignmentPolicies::Shrink>, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::AlignmentPolicies::Shrink>::malloc<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>' requested here
45 | return devAllocator->malloc(acc, size);
| ^
/home/shamse09/mallocMC/examples/getAvailableSlots/source/main.cpp:80:54: note: in instantiation of function template specialization 'mallocMC::AllocatorHandleImpl<mallocMC::Allocator<alpaka::TagGpuHipRt, mallocMC::CreationPolicies::Scatter, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>>::malloc<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>' requested here
80 | arA = static_cast<int*>(allocHandle.malloc(acc, sizeof(int) * 32U));
| ^
/home/shamse09/mallocMC/build/_deps/alpaka-src/include/alpaka/kernel/TaskKernelGpuUniformCudaHipRt.hpp:76:13: note: in instantiation of member function 'ExampleKernel<mallocMC::Allocator<alpaka::TagGpuHipRt, mallocMC::CreationPolicies::Scatter, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>>::operator()' requested here
76 | kernelFnObj(const_cast<TAcc const&>(acc), args...);
| ^
/home/shamse09/mallocMC/build/_deps/alpaka-src/include/alpaka/kernel/TaskKernelGpuUniformCudaHipRt.hpp:251:21: note: in instantiation of function template specialization 'alpaka::detail::gpuKernel<ExampleKernel<mallocMC::Allocator<alpaka::TagGpuHipRt, mallocMC::CreationPolicies::Scatter, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>>, alpaka::ApiHipRt, alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>, std::integral_constant<unsigned long, 1>, unsigned long, mallocMC::AllocatorHandleImpl<mallocMC::Allocator<alpaka::TagGpuHipRt, mallocMC::CreationPolicies::Scatter, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>>>' requested here
251 | gpuKernel<TKernelFnObj, TApi, TAcc, TDim, TIdx, remove_restrict_t<std::decay_t>...>;
| ^
/home/shamse09/mallocMC/build/_deps/alpaka-src/include/alpaka/queue/Traits.hpp:49:54: note: in instantiation of member function 'alpaka::trait::Enqueue<alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiHipRt, true>, alpaka::TaskKernelGpuUniformCudaHipRt<alpaka::ApiHipRt, alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>, std::integral_constant<unsigned long, 1>, unsigned long, ExampleKernel<mallocMC::Allocator<alpaka::TagGpuHipRt, mallocMC::CreationPolicies::Scatter, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>>, mallocMC::AllocatorHandleImpl<mallocMC::Allocator<alpaka::TagGpuHipRt, mallocMC::CreationPolicies::Scatter, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>>>>::enqueue' requested here
49 | trait::Enqueue<TQueue, std::decay_t>::enqueue(queue, std::forward(task));
| ^
/home/shamse09/mallocMC/examples/getAvailableSlots/source/main.cpp:125:13: note: in instantiation of function template specialization 'alpaka::enqueue<alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiHipRt, true>, alpaka::TaskKernelGpuUniformCudaHipRt<alpaka::ApiHipRt, alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>, std::integral_constant<unsigned long, 1>, unsigned long, ExampleKernel<mallocMC::Allocator<alpaka::TagGpuHipRt, mallocMC::CreationPolicies::Scatter, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>>, mallocMC::AllocatorHandleImpl<mallocMC::Allocator<alpaka::TagGpuHipRt, mallocMC::CreationPolicies::Scatter, mallocMC::DistributionPolicies::Noop, mallocMC::OOMPolicies::ReturnNull, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>>>>' requested here
125 | alpaka::enqueue(
| ^
/home/shamse09/mallocMC/examples/getAvailableSlots/source/main.cpp:137:5: note: in instantiation of function template specialization 'example03<mallocMC::CreationPolicies::Scatter, mallocMC::ReservePoolPolicies::AlpakaBuf<alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>>, mallocMC::AlignmentPolicies::Shrink>' requested here
137 | example03<Scatter, mallocMC::ReservePoolPolicies::AlpakaBuf>();
| ^
/home/shamse09/mallocMC/build/_deps/alpaka-src/include/alpaka/intrinsic/Traits.hpp:38:24: note: candidate function [with TIntrinsic = alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>]
38 | ALPAKA_FN_ACC auto popcount(TIntrinsic const& intrinsic, std::uint32_t value) -> std::int32_t
| ^
/home/shamse09/mallocMC/build/_deps/alpaka-src/include/alpaka/intrinsic/Traits.hpp:51:24: note: candidate function [with TIntrinsic = alpaka::AccGpuUniformCudaHipRt<alpaka::ApiHipRt, std::integral_constant<unsigned long, 1>, unsigned long>]
51 | ALPAKA_FN_ACC auto popcount(TIntrinsic const& intrinsic, std::uint64_t value) -> std::int32_t
| ^
1 warning and 1 error generated when compiling for gfx1100.
make[3]: *** [examples/getAvailableSlots/CMakeFiles/mallocMCExampleGetAvailableSlots.dir/build.make:78: examples/getAvailableSlots/CMakeFiles/mallocMCExampleGetAvailableSlots.dir/source/main.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:323: examples/getAvailableSlots/CMakeFiles/mallocMCExampleGetAvailableSlots.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:265: examples/CMakeFiles/mallocMCExamples.dir/rule] Error 2
make: *** [Makefile:205: mallocMCExamples] Error 2

compiling works find with hip@6.3.3

Activity

  1. chillenzer commented on Nov 24, 2026

    @chillenzer
    Contributor

    Fixed by #307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions