oneapi-src / oneapi-src/oneAPI-samples

printf question

Đang mở
#675 0 bình luận 0 reaction 2 người được giao Xem trên GitHub

@xmnboy đang làm issue này rồi.

Từ ngày 29/10/2021.

question
Ngôn ngữ chính
C++
Star
1.2k
Fork
745
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

It is not clear why printf is not supported in DPC++. printf is supported in DPC++ with CUDA support.

Addressing Warnings in Migrated Code
Migration generated one warning for code that dpct could not migrate:

warning: DPCT1015:0: Output needs adjustment.
As you have noticed, the migration of this project resulted in one DPCT message that needs to be addressed, DPCT1015. This message is shown because as the Compatibility Tool migrated from the printf-style formatted string in the CUDA code to the output stream supported by DPC++, manual adjustment is needed to generate the equivalent output.

Open result/foo/bar/util.dp.cpp and locate the error DPCT1015. Then make the following changes:

Change:

stream_ct1 << "kernel_util,%d\n";
to

stream_ct1 << "kernel_util," << c << sycl::endl;
You’ll also need to change the stream statement in result/foo/main.dp.cpp.

Change:

stream_ct1 << z"kernel_main!\n";
to

stream_ct1 << "kernel_main!" << sycl::endl;

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.