Skip to content

[SYCL][CUDA] __CUDA_ARCH__ defined when compiling for CUDA backend since sycl-nightly/20221129 #7722

Closed
@AuroraPerego

Description

@AuroraPerego

While trying to compile my application with different nightlies at some point the compilation started to fail.
I found out that the reason is that __CUDA_ARCH__ is defined, while it wasn't before and I was wondering whether this is wanted or not.

How to reproduce:

clang++ -fsycl -std=c++17 dummy.cpp -dM -E -fsycl-targets=nvptx64-nvidia-cuda -fno-bundle-offload-arch --cuda-path=/usr/local/cuda -Wno-unknown-cuda-version -Wno-linker-warnings | grep CUDA_ARCH

dummy.cpp is just:

#include <CL/sycl.hpp>

int main(){
    return 0;
}

The commit that led to this change is this.

  • OS: Linux
  • CUDA version: 11.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    cudaCUDA back-end

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions