Created
June 17, 2025 18:14
-
-
Save elliottslaughter/468e6573f0f98349316cb8c21928ae51 to your computer and use it in GitHub Desktop.
Reproducer for https://github.com/StanfordLegion/legion/issues/1870
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:20.04 | |
| ENV DEBIAN_FRONTEND noninteractive | |
| COPY repro2.cc /repro2.cc | |
| RUN apt-get update -qq && apt-get install -qq build-essential && g++ -shared -fPIC -o /librepro2.so /repro2.cc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| struct CUstream_st; | |
| typedef CUstream_st *cudaStream_t; | |
| #define CUstream cudaStream_t | |
| static const CUstream INVALID_STREAM = reinterpret_cast<CUstream>(-1); | |
| namespace ThreadLocal { | |
| static thread_local CUstream current_stream = INVALID_STREAM; | |
| }; | |
| static void cuhook_stream_callback() | |
| { | |
| if(ThreadLocal::current_stream == INVALID_STREAM) { | |
| printf("[HELLO INVALID]: \n"); | |
| } | |
| } | |
| int test() | |
| { | |
| cuhook_stream_callback(); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment