printf question
@xmnboy 已經在處理了。
開始於 2021年10月29日。
評估
這個 Issue 還沒有評估資料。
描述
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;
- 主要語言
- C++
- 星號
- 1.2k
- 分支
- 745
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
oneapi-src/oneAPI-samples 的其他 Issue
-
bug
難度 3/5 1-2 天 新手友好度 45/100
oneapi-src/oneAPI-samples#2764 ·
-
難度 4/5 3-5 天 新手友好度 35/100
oneapi-src/oneAPI-samples#2748 ·
-
難度 5/5 一週以上 新手友好度 10/100
oneapi-src/oneAPI-samples#2746 ·
-
Lenovo Thinkpad T440p Ethernet issue warning sign show install multiple times but same issue face 未關閉question
難度 4/5 3-5 天 新手友好度 15/100
oneapi-src/oneAPI-samples#2739 ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
oneapi-src/oneAPI-samples#2705 ·
查看 oneapi-src/oneAPI-samples 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
drogonframework/drogon#2605 ·
-
難度 2/5 1-3 小時 新手友好度 86/100
ArthurSonzogni/FTXUI#1363 ·
-
難度 1/5 1 小時以內 新手友好度 94/100
MiSTer-devel/Main_MiSTer#1325 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 2/5 1-3 小時 新手友好度 88/100