Co-installability testing
# Tests:
# i. v6 and v7 of the compilers both function
# ii. dpclang resolves to v7 of the compiler by default
# iii. swap between v6 and v7 of the compilers using update-alternatives
#
$ dpclang-6 --version
DPC++ compiler 6.2.0 build based on:
clang version 21.0.0dpcpp6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/dpcpp-6/llvm/bin
Build config: +assertions
$ dpclang-7 --version
DPC++ compiler 7.0.0 build based on:
clang version 22.1.0dpcpp7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/dpcpp-7/llvm/bin
Build config: +assertions
$ readlink -f /usr/bin/dpclang
/usr/lib/dpcpp-7/llvm/bin/clang-22
$ update-alternatives --list dpclang
/usr/bin/dpclang-6
/usr/bin/dpclang-7
$ dpclang --version
DPC++ compiler 7.0.0 build based on:
clang version 22.1.0dpcpp7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/dpcpp-7/llvm/bin
Build config: +assertions
$ cat > /tmp/hello.cpp <<'EOF'
#include <sycl/sycl.hpp>
int main() {
sycl::queue q;
std::printf("running on: %s\n",
q.get_device().get_info<sycl::info::device::name>().c_str());
return 0;
}
EOF
$ dpclang++ -fsycl /tmp/hello.cpp -o /tmp/hello && /tmp/hello
running on: Intel(R) Arc(TM) Graphics
$ dpclang++-6 -fsycl /tmp/hello.cpp -o /tmp/hello6 && /tmp/hello6
running on: Intel(R) Arc(TM) Graphics
$ dpclang++-7 -fsycl /tmp/hello.cpp -o /tmp/hello7 && /tmp/hello7
running on: Intel(R) Arc(TM) Graphics
$ sudo update-alternatives --set dpclang /usr/bin/dpclang-6
update-alternatives: using /usr/bin/dpclang-6 to provide /usr/bin/dpclang
(dpclang) in manual mode
$ dpclang --version
DPC++ compiler 6.2.0 build based on:
clang version 21.0.0dpcpp6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/dpcpp-6/llvm/bin
Build config: +assertions
$ dpclang++ -fsycl /tmp/hello.cpp -o /tmp/hello && /tmp/hello
running on: Intel(R) Arc(TM) Graphics
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164915
Title:
[needs-packaging] intel-dpcpp-7
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/2164915/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs