NVCC unable to compile multi_arrays
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Tái hiện ví dụ tối thiểu từ main.cu bằng lệnh NVCC được cung cấp, sau đó kiểm tra boost/multi_array/base.hpp xung quanh dòng 408 và 414, nơi NVCC báo lỗi cú pháp. So sánh các đường dẫn biên dịch .cu và .cpp; công việc được xem là hoàn tất khi khai báo multi_array tối thiểu biên dịch được trong tệp .cu bằng NVCC.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I am trying to use multi_arrays in a CUDA GPU project and NVCC is unable to compile it.
NVCC version is 12.3 (error also occurs with other versions)
Boost version is 1.84.0 (error also occurs with other versions)
I used the following command to compile:
nvcc -o C:/_repro/output.exe C:/_repro/main.cu -IC:/boost_1_84_0
I am using the following code (main.cu):
#include <boost/multi_array.hpp>
int main()
{
boost::multi_array<int, 3> my_arr;
return 0;
}
I get the following errors:
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2988: unrecognizable template declaration/definition
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2143: syntax error: missing ')' before '<'
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2143: syntax error: missing ';' before '<'
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2238: unexpected token(s) preceding ';'
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2059: syntax error: '<'
C:/boost_1_84_0\boost/multi_array/base.hpp(414): error C2059: syntax error: ')'
C:/boost_1_84_0\boost/multi_array/base.hpp(494): error C2143: syntax error: missing ';' before '}'
C:/boost_1_84_0\boost/multi_array/base.hpp(494): error C2238: unexpected token(s) preceding ';'
Several more errors occur when I attempt to use further multi_array functionality such as extents and indexing, this is just a minimal example. Additionally, the code compiles just fine when you change the file extention to .cpp, but I assume this is just NVCC falling back on the default cl.exe compiler. I specifically need multi_arrays to compile within a .cu file along with CUDA device code.
Any help is much appreciated, thank you.
- Ngôn ngữ chính
- C++
- Star
- 32
- Fork
- 39
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 boostorg/multi_array
-
multi_array doesn't compile Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
boostorg/multi_array#38 · 2 bình luận · 1 reaction ·
-
boostorg/multi_array#35 · 2 bình luận · 1 người được giao ·
-
provide multi_array::swap Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
boostorg/multi_array#33 ·
-
Performance issue on resize Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
boostorg/multi_array#32 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
boostorg/multi_array#31 · 2 bình luận ·
Tất cả issue của boostorg/multi_array
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
AXERA-TECH/ax-llm#77 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
games-on-whales/wolf#509 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
bug-unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100