Skip to content

[clang-repl] : Splitting input about lines produces different results with cuda flag #158021

@anutosh491

Description

@anutosh491

As pointed out by @Vipul-Cariappa , it seems splitting input about lines (or clubbing them into 1) might produce different results.

Here's my attempt on https://github.com/llvm/llvm-project/blob/main/clang/test/Interpreter/CUDA/sanity.cu

anutosh491@vv-nuc:/build/anutosh491/llvm-project/build2/bin$ ./clang-repl --cuda
clang-repl> extern "C" int printf(const char*, ...);__global__ void test_func() {}test_func<<<1,1>>>();printf("CUDA Error: %d\n", cudaGetLastError());
CUDA Error: 98
clang-repl> %quit

anutosh491@vv-nuc:/build/anutosh491/llvm-project/build2/bin$ ./clang-repl --cuda
clang-repl> extern "C" int printf(const char*, ...);
clang-repl> __global__ void test_func() {}
clang-repl> test_func<<<1,1>>>();
clang-repl> printf("CUDA Error: %d\n", cudaGetLastError());
CUDA Error: 0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions