ginkgo icon indicating copy to clipboard operation
ginkgo copied to clipboard

Depercated dpcpp by sycl

Open yhmtsai opened this issue 1 year ago • 1 comments

Replace namespace/compile flag dpcpp and DpcppExecutor with sycl and SyclExecutor. Also, replace a lot of dpcpp-related variable and name.

For namespace deprecation, it's a little weird. Although https://en.cppreference.com/w/cpp/language/attributes/deprecated shows the namespace deprecation should be available since c++14, clang will show it from c++17-extension like https://stackoverflow.com/questions/22806878/is-there-a-way-to-deprecate-a-namespace clang only mentions it as c++17-extension after 6. I do not find a way to disable c++17-extension for -std=c++14 to check the behavior without the extension. Currently, I only provide the function or type alias deprecation for those public functions or types.

However, introducing the sycl namespace leads the type/function from sycl standard are not found by sycl::.... Thus, it's required to use ::sycl::... for all of them. Another way is to add using namespace ::sycl; in the gko sycl namespace (maybe the include/ginkgo/core/base/executor.hpp is a good place because everything will include it). or use another name for namespace.

TODO:

  • [ ] based on #1350
  • [ ] dpcpp folder to sycl folder?
  • [ ] .dp.cpp/hpp to .sycl.cpp/hpp or just normal .cpp/hpp
  • [ ] ginkgo_dpcpp to ginkgo_sycl (considered as public, I think) -> provide symlink for that

yhmtsai avatar Aug 22 '23 14:08 yhmtsai

Error: The following files need to be formatted:

dpcpp/preconditioner/jacobi_common.hpp.in

You can find a formatting patch under Artifacts here or run format! if you have write access to Ginkgo

ginkgo-bot avatar Aug 22 '23 14:08 ginkgo-bot