4
运行时
dtk-22.10 版本缺少 amd_comgr 的 cmake 配置文件 lib/cmake/amd_comgr
2022-12-05 20:08:58
118

在cmake 中启用 enable_language(HIP) 时, dtk-22.10 的版本会报如下的错误:

-- Detecting HIP compiler ABI info
CMake Error at /public/share/ghfund2_a27/apps/python/3.11.0-gcc9/lib/python3.11/site-packages/cmake/data/share/cmake-3.25/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
By not providing "Findamd_comgr.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"amd_comgr", but CMake did not find one.

Could not find a package configuration file provided by "amd_comgr" with
any of the following names:

amd_comgrConfig.cmake
amd_comgr-config.cmake

Add the installation prefix of "amd_comgr" to CMAKE_PREFIX_PATH or set
"amd_comgr_DIR" to a directory containing one of the above files. If
"amd_comgr" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
/public/software/compiler/rocm/dtk-22.10/lib/cmake/hip-lang/hip-lang-config.cmake:88 (find_dependency)
/public/share/ghfund2_a27/apps/python/3.11.0-gcc9/lib/python3.11/site-packages/cmake/data/share/cmake-3.25/Modules/CMakeHIPInformation.cmake:146 (find_package)
/public/home/ghfund2_a27/codes/qiskit-aer/_skbuild/linux-x86_64-3.11/cmake-build/CMakeFiles/CMakeScratch/TryCompile-r5WdAL/CMakeLists.txt:5 (project)

CMake Error at /public/share/ghfund2_a27/apps/python/3.11.0-gcc9/lib/python3.11/site-packages/cmake/data/share/cmake-3.25/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
/public/share/ghfund2_a27/apps/python/3.11.0-gcc9/lib/python3.11/site-packages/cmake/data/share/cmake-3.25/Modules/CMakeTestHIPCompiler.cmake:29 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:46 (enable_language

而在 /public/software/compiler/rocm/dtk-22.10/lib/cmake/  下的确没有 amd_comgr 文件夹。而 dtk-22.04.2 版本 则月相应的目录 /public/software/compiler/rocm/dtk-22.04.2/lib/cmake/amd_comgr 。 目前一直卡在这里。

全部评论(5)
只看楼主
网
网友4vuUox
楼主
2楼
/public/software/compiler/rocm/dtk-22.10/lib64/cmake/ 下面有 amd_comgr 目录,能链接到 /public/software/compiler/rocm/dtk-22.10/lib/cmake/么?
2022/12/5
T
tianlh
回复 @网友4vuUox
您好,如微信沟通,可以将dtk22.10整个目录拷贝到自己账号下修改。
2022/12/6
网
网友4vuUox
回复 @网友4vuUox

是的。修改后可以了。但thrust 库还有问题:

[ghfund2_a27@login08 codes]$ grep -R "error:" -A3 a.log

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/internal/copy_cross_system.h:122:53: error: no matching constructor for initialization of 'thrust::detail::temporary_array<InputTy, tag>' (aka 'temporary_array<std::complex<double>, thrust::system::cpp::detail::tag>')

thrust::detail::temporary_array<InputTy, H> temp(host_s, num_items);

^ ~~~~~~~~~~~~~~~~~

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/internal/copy_cross_system.h:176:22: note: in instantiation of function template specialization 'thrust::hip_rocprim::__copy::cross_system_copy_n_hd_nt<thrust::system::cpp::detail::tag, thrust::hip_rocprim::tag, const std::complex<double> *, const std::complex<double> *, thrust::detail::normal_iterator<thrust::device_ptr<thrust::complex<double>>>>' requested here

--

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/internal/copy_cross_system.h:126:56: error: invalid operands to binary expression ('std::complex<double> *' and 'const std::complex<double> *')

::new(static_cast<void*>(temp.data().get() + idx)) InputTy(*first);

~~~~~~~~~~~~~~~~~ ^ ~~~

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/internal/copy_cross_system.h:131:53: error: no matching constructor for initialization of 'thrust::detail::temporary_array<InputTy, tag>' (aka 'temporary_array<std::complex<double>, thrust::hip_rocprim::tag>')

thrust::detail::temporary_array<InputTy, D> d_in_ptr(device_s, num_items);

^ ~~~~~~~~~~~~~~~~~~~

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/detail/temporary_array.h:77:5: note: candidate constructor not viable: no known conversion from 'const std::complex<double> *' to 'thrust::detail::temporary_array<std::complex<double>, thrust::hip_rocprim::tag>::size_type' (aka 'unsigned long') for 2nd argument

--

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/internal/copy_cross_system.h:134:29: error: no matching function for call to 'trivial_copy_to_device'

hipError_t status = hip_rocprim::trivial_copy_to_device(

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/util.h:135:1: note: candidate function template not viable: no known conversion from 'const std::complex<double> *' to 'size_t' (aka 'unsigned long') for 3rd argument

--

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/detail/generic/advance.inl:48:5: error: invalid operands to binary expression ('const std::complex<double> *' and 'const std::complex<double> *')

i += n;

~ ^ ~

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/detail/generic/advance.inl:58:44: note: in instantiation of function template specialization 'thrust::system::detail::generic::detail::advance<const std::complex<double> *, const std::complex<double> *>' requested here

--

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/copy.h:167:60: error: invalid operands to binary expression ('thrust::pointer<std::complex<double>, thrust::hip_rocprim::tag>' and 'const std::complex<double> *')

return __copy::device_to_device(system, first, first + n, result);

~~~~~ ^ ~

/public/home/ghfund2_a27/dtk-22.10.2/include/thrust/system/hip/detail/copy.h:153:10: note: in instantiation of member function 'thrust::hip_rocprim::copy_n(execution_policy<thrust::hip_rocprim::tag> &, thrust::pointer<std::complex<double>, thrust::hip_rocprim::tag>, const std::complex<double> *, thrust::detail::normal_iterator<thrust::device_ptr<thrust::complex<double>>>)::workaround::par' requested here

--

/public/home/ghfund2_a27/dtk-22.10.2/include/rocprim/device/detail/device_transform.hpp:107:19: error: invalid operands to binary expression ('__gnu_cxx::__normal_iterator<const double *, std::vector<double>>' and 'const unsigned int')

input + block_offset,

~~~~~ ^ ~~~~~~~~~~~~

/public/home/ghfund2_a27/dtk-22.10.2/include/rocprim/device/device_transform.hpp:60:5: note: in instantiation of function template specialization 'rocprim::detail::transform_kernel_impl<256U, 8U, unsigned long, __gnu_cxx::__normal_iterator<const double *, std::vector<double>>, __gnu_cxx::__normal_iterator<unsigned long *, std::vector<unsigned long>>, (lambda at /public/home/ghfund2_a27/dtk-22.10.2/include/rocprim/device/device_binary_search.hpp:76:9)>' requested here

--

/public/home/ghfund2_a27/dtk-22.10.2/include/rocprim/device/detail/device_transform.hpp:123:20: error: invalid operands to binary expression ('__gnu_cxx::__normal_iterator<unsigned long *, std::vector<unsigned long>>' and 'const unsigned int')

output + block_offset,

~~~~~~ ^ ~~~~~~~~~~~~

/public
2022/12/6
网
网友4vuUox
回复 @网友4vuUox

/public/home/ghfund2_a27/dtk-22.10.2/include/rocprim/device/device_transform.hpp:60:5: note: in instantiation of function template specialization 'rocprim::detail::transform_kernel_impl<256U, 8U, unsigned long, __gnu_cxx::__normal_iterator<const double *, std::vector<double>>, __gnu_cxx::__normal_iterator<unsigned long *, std::vector<unsigned long>>, (lambda at /public/home/ghfund2_a27/dtk-22.10.2/include/rocprim/device/device_binary_search.hpp:76:9)>' requested here

--

/public/home/ghfund2_a27/dtk-22.10.2/include/rocprim/device/detail/device_transform.hpp:123:20: error: invalid operands to binary expression ('__gnu_cxx::__normal_iterator<unsigned long *, std::vector<unsigned long>>' and 'const unsigned int')

output + block_offset,

~~~~~~ ^ ~~~~~~~~~~~~

/public/home/ghfund2_a27/dtk-22.10.2/include/rocprim/device/../iterator/discard_iterator.hpp:215:1: note: candidate function not viable: no known conversion from '__gnu_cxx::__normal_iterator<unsigned long *, std::vector<unsigned long>>' to 'typename discard_iterator::difference_type' (aka 'long') for 1st argument
2022/12/6
网
网友4vuUox
楼主
1楼
通过手动添加 一个 amd_comgr 的cmake 目录 `/public/home/ghfund2_a27/dtk-22.10/lib/cmake` 也不管用。
2022/12/5
没有更多内容了
--
楼主
Level.2
0 帖子
楼主热帖
暂无数据