CudaAllocator报错
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
环境 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
- Ngôn ngữ chính
- C++
- Star
- 4.2k
- Fork
- 554
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của parallel101/course
-
访问者设计模式缺少继承Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
parallel101/course#35 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
parallel101/course#29 ·
-
print.h 没有包含头文件 cstdintĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 45/100
parallel101/course#39 ·
-
C++17之后才保证new一定对齐。Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 42/100
parallel101/course#38 ·
-
函数返回匿名结构体无法编译Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
parallel101/course#36 · 2 bình luận ·
Tất cả issue của parallel101/course
Issue tương tự
-
[Docs] CONTRIBUTING still says FreeType 2.14.3 and TabLabel.h says ImGui 1.92.9b after the bumpsCó thể đã có người làm @mgradwohl đã nhận hôm nay. Đang mởagent:WSL documentation LOW
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
build sdl2 fail on ubuntuĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
finalburnneo/FBNeo#2820 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/ysql kind/enhancement priority/medium status/awaiting-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
yugabyte/yugabyte-db#35578 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cudf-polars feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 2 ngày
-
(S1 - Need confirmation)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CleverRaven/Cataclysm-DDA#89212 ·
Maintainer thường phản hồi trong vòng 1 ngày