CudaAllocator报错
まだ誰も着手していません。
評価
調査の方向性
Start with the referenced lesson code at 08/04_sugar/01/main.cu#L7 and the allocator instantiation reported at src/allocator.cu line 30. Reproduce the build with Visual Studio 2022 and CUDA 12.2, then compare the CudaAllocator usage with the compiler diagnostics in vector. Done means the lesson code builds successfully without the reported allocator conversion errors.
索引モデルが issue の本文から書いたものです。
説明
环境 VS2022 cuda12.2
报错信息
[build] MSBuild version 17.4.0+18d5aef85 for .NET Framework
[build] Compiling CUDA source file ..\src\allocator.cu...
[build]
[build] C:\Dev\mgxpbd\build>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" --use-local-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64" -x cu -IC:\Dev\mgxpbd\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static --generate-code=arch=compute_52,code=[compute_52,sm_52] -std=c++17 -Xcompiler="/EHsc -Ob0 -Zi" -g -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -D"CMAKE_INTDIR=\"Debug\"" -Xcompiler "/EHsc /W1 /nologo /Od /FS /Zi /RTC1 /MDd " -Xcompiler "/Fdallocator.dir\Debug\vc143.pdb" -o allocator.dir\Debug\allocator.obj "C:\Dev\mgxpbd\src\allocator.cu"
[build] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vector(2125): error : no suitable user-defined conversion from "CudaAllocator<int>" to "CudaAllocator<std::_Container_proxy>" exists [C:\Dev\mgxpbd\build\allocator.vcxproj]
[build] auto&& _Alproxy = static_cast<_Rebind_alloc_t<_Alty, _Container_proxy>>(_Al);
[build] ^
[build] detected during:
[build] instantiation of "void std::vector<_Ty, _Alloc>::_Construct_n(std::vector<_Ty, _Alloc>::size_type, _Valty &&...) [with _Ty=int, _Alloc=CudaAllocator<int>, _Valty=<>]" at line 683
[build] instantiation of "std::vector<_Ty, _Alloc>::vector(std::vector<_Ty, _Alloc>::size_type, const _Alloc &) [with _Ty=int, _Alloc=CudaAllocator<int>]" at line 30 of C:\Dev\mgxpbd\src\allocator.cu
[build]
[build] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vector(832): error : no suitable user-defined conversion from "CudaAllocator<int>" to "CudaAllocator<std::_Container_proxy>" exists [C:\Dev\mgxpbd\build\allocator.vcxproj]
[build] auto&& _Alproxy = static_cast<_Rebind_alloc_t<_Alty, _Container_proxy>>(_Getal());
[build] ^
[build] detected during instantiation of "std::vector<_Ty, _Alloc>::~vector() noexcept [with _Ty=int, _Alloc=CudaAllocator<int>]" at line 30 of C:\Dev\mgxpbd\src\allocator.cu
[build]
[build] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vector(833): error : no instance of function template "std::_Delete_plain_internal" matches the argument list [C:\Dev\mgxpbd\build\allocator.vcxproj]
[build] argument types are: (<error-type>, std::_Container_proxy *)
[build] _Delete_plain_internal(_Alproxy, ::std:: exchange(_Mypair._Myval2._Myproxy, nullptr));
[build] ^
[build] detected during instantiation of "std::vector<_Ty, _Alloc>::~vector() noexcept [with _Ty=int, _Alloc=CudaAllocator<int>]" at line 30 of C:\Dev\mgxpbd\src\allocator.cu
[build]
[build] 3 errors detected in the compilation of "C:/Dev/mgxpbd/src/allocator.cu".
[build] allocator.cu
[build] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.2.targets(799,9): error MSB3721: 命令“"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" --use-local-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64" -x cu -IC:\Dev\mgxpbd\include
- 主要言語
- C++
- スター
- 4.2k
- フォーク
- 555
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
parallel101/course のほかの issue
-
访问者设计模式缺少继承オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
parallel101/course#35 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
parallel101/course#29 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
parallel101/course#39 ·
-
C++17之后才保证new一定对齐。オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
parallel101/course#38 ·
-
函数返回匿名结构体无法编译オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
parallel101/course#36 · コメント 2 件 ·
parallel101/course の issue をすべて見る
似ている issue
-
Round video messages start gray and blocky with libx264: encoder is configured for 1,000,000 fpsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
telegramdesktop/tdesktop#31422 ·
メンテナーはふだん 9 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zen-browser/desktop#15809 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ggml-org/whisper.cpp#4103 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bitcoin-core/gui-qml#987 ·
メンテナーはふだん 3 日以内に返信