Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71648d0

Browse files
authored
[CUDA] redefine __builtin_FILE() to keep filename stable (#356)
Recent glibc versions switched to using __builtin_FILE() for reporting file name in assert messages and that breaks CUDA tests. Redefine the builtin with a fixed string file name for assert test.
1 parent 14bb494 commit 71648d0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

External/CUDA/assert.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Use fixed value for __FILE__ so assert message does not depend on
55
// the actual path to the file during compilation..
66
#define __FILE__ "assert.cu"
7+
#define __builtin_FILE() __FILE__
78

89
__global__ void kernel() {
910
// Our reference output contains the line number of this assert() call; be

0 commit comments

Comments
 (0)