Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DeviceSanitizer] Support detecting out-of-bounds error on CPU Device & Static Local Memory #1210

Merged
merged 185 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 180 commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
4c9fe03
Add UR Sanitizer Layer
AllanZyne Nov 1, 2023
d6e589b
UR Sanitizer: Add shadow memory alloc & memset
AllanZyne Nov 1, 2023
67fcd5e
[UR][CUDA][L0][HIP] Add virtual memory adapter implementations
steffenlarsen Oct 9, 2023
1096b0f
Remove duplicate CUDA UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT case
steffenlarsen Oct 9, 2023
c36bd72
Fix return of check error
steffenlarsen Oct 9, 2023
6ba94ac
Fix common include in cuda device.hpp
steffenlarsen Oct 10, 2023
9ae8a99
Zero-initialize CUmemAccessDesc
steffenlarsen Oct 11, 2023
9f90e43
Add missing newline
steffenlarsen Oct 11, 2023
336ce89
Fix wrongful use of UR_ASSERT in cuda implementation
steffenlarsen Oct 13, 2023
84a3afa
an -> a
steffenlarsen Oct 13, 2023
a8dadc1
UR Sanitizer: fix bug
AllanZyne Nov 2, 2023
4d63350
UR Sanitizer: Add membuffer
AllanZyne Nov 3, 2023
25b1183
UR Sanitizer: Add membuffer red zone marker
AllanZyne Nov 3, 2023
e6bc306
UR Sanitizer: add membuffer check
AllanZyne Nov 6, 2023
23fb1b3
UR log
AllanZyne Nov 9, 2023
cb8a761
UR change directory
AllanZyne Nov 13, 2023
5c44b1d
UR refactor code
AllanZyne Nov 13, 2023
a377c94
UR refactor code
AllanZyne Nov 13, 2023
96eea7a
UR: WIP partition membuffer
AllanZyne Nov 14, 2023
0a72ea9
UR: clean code
AllanZyne Nov 14, 2023
8fa86dd
UR: clean code
AllanZyne Nov 14, 2023
d9a51a7
Revert "an -> a"
AllanZyne Nov 14, 2023
730bf45
Revert "Fix wrongful use of UR_ASSERT in cuda implementation"
AllanZyne Nov 14, 2023
fed541a
UR: refactor
AllanZyne Nov 14, 2023
ad2b1a7
Revert "Add missing newline"
AllanZyne Nov 14, 2023
dec5f32
Revert "Zero-initialize CUmemAccessDesc"
AllanZyne Nov 14, 2023
ca58886
Revert "Fix common include in cuda device.hpp"
AllanZyne Nov 14, 2023
11cca13
Revert "Fix return of check error"
AllanZyne Nov 14, 2023
3e6194e
Revert "Remove duplicate CUDA UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT c…
AllanZyne Nov 14, 2023
89febf0
Revert "[UR][CUDA][L0][HIP] Add virtual memory adapter implementations"
AllanZyne Nov 14, 2023
1b81df9
UR: revert gitignore
AllanZyne Nov 14, 2023
030400d
UR: cmake option
AllanZyne Nov 14, 2023
7208518
UR: clean code
AllanZyne Nov 14, 2023
668a11e
UR: clean code
AllanZyne Nov 14, 2023
f623135
UR: clean code
AllanZyne Nov 14, 2023
7be8667
UR: clean code
AllanZyne Nov 14, 2023
e4a47ac
UR: clean code
AllanZyne Nov 14, 2023
61c0ca9
UR: llvm license
AllanZyne Nov 14, 2023
0ad1bb1
UR: llvm license
AllanZyne Nov 14, 2023
cc4402a
UR: once
AllanZyne Nov 14, 2023
bf358c1
UR: clean code
AllanZyne Nov 14, 2023
d5e7946
UR: clean includes
AllanZyne Nov 14, 2023
50666b7
UR: clean comment
AllanZyne Nov 14, 2023
de03096
UR: rename files
AllanZyne Nov 14, 2023
b47ca29
UR: update readme
AllanZyne Nov 14, 2023
1e2b6a0
UR: fix according to PR comments
AllanZyne Nov 15, 2023
42f6755
UR: UR_ENABLE_SANITIZER=ON default
AllanZyne Nov 15, 2023
5aaba09
ignore VS clangd files
AllanZyne Nov 21, 2023
8dc90fd
fix comments
AllanZyne Nov 21, 2023
3b819f6
resolve comments
AllanZyne Nov 21, 2023
54220e9
resolve comments
AllanZyne Nov 21, 2023
c814c68
Add UR Sanitizer Layer
AllanZyne Nov 1, 2023
a5f31d9
UR Sanitizer: Add shadow memory alloc & memset
AllanZyne Nov 1, 2023
96eea47
[UR][CUDA][L0][HIP] Add virtual memory adapter implementations
steffenlarsen Oct 9, 2023
51f7ac7
Remove duplicate CUDA UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT case
steffenlarsen Oct 9, 2023
d15f020
Fix return of check error
steffenlarsen Oct 9, 2023
9bb9a73
Fix common include in cuda device.hpp
steffenlarsen Oct 10, 2023
55a57aa
Zero-initialize CUmemAccessDesc
steffenlarsen Oct 11, 2023
1bfbcbd
Add missing newline
steffenlarsen Oct 11, 2023
ef1337f
Fix wrongful use of UR_ASSERT in cuda implementation
steffenlarsen Oct 13, 2023
2215b83
an -> a
steffenlarsen Oct 13, 2023
20a0a78
UR Sanitizer: fix bug
AllanZyne Nov 2, 2023
cde417d
UR Sanitizer: Add membuffer
AllanZyne Nov 3, 2023
4cd06d0
UR Sanitizer: Add membuffer red zone marker
AllanZyne Nov 3, 2023
1ce4227
UR Sanitizer: add membuffer check
AllanZyne Nov 6, 2023
f9165a7
UR log
AllanZyne Nov 9, 2023
20fb98f
UR change directory
AllanZyne Nov 13, 2023
521b6af
UR refactor code
AllanZyne Nov 13, 2023
07a2a3d
UR refactor code
AllanZyne Nov 13, 2023
5b33e48
UR: WIP partition membuffer
AllanZyne Nov 14, 2023
a7a204f
UR: clean code
AllanZyne Nov 14, 2023
e42471b
UR: clean code
AllanZyne Nov 14, 2023
d2a337f
Revert "an -> a"
AllanZyne Nov 14, 2023
255203e
Revert "Fix wrongful use of UR_ASSERT in cuda implementation"
AllanZyne Nov 14, 2023
9309e1b
UR: refactor
AllanZyne Nov 14, 2023
3e3e070
Revert "Add missing newline"
AllanZyne Nov 14, 2023
1e20c4d
Revert "Zero-initialize CUmemAccessDesc"
AllanZyne Nov 14, 2023
23d90b5
Revert "Fix common include in cuda device.hpp"
AllanZyne Nov 14, 2023
d28acd7
Revert "Fix return of check error"
AllanZyne Nov 14, 2023
541c7d2
Revert "Remove duplicate CUDA UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT c…
AllanZyne Nov 14, 2023
12fc508
Revert "[UR][CUDA][L0][HIP] Add virtual memory adapter implementations"
AllanZyne Nov 14, 2023
301547f
UR: revert gitignore
AllanZyne Nov 14, 2023
c3114b1
UR: cmake option
AllanZyne Nov 14, 2023
041d50f
UR: clean code
AllanZyne Nov 14, 2023
4734669
UR: clean code
AllanZyne Nov 14, 2023
2fd17ce
UR: clean code
AllanZyne Nov 14, 2023
c6d9e08
UR: clean code
AllanZyne Nov 14, 2023
987882d
UR: clean code
AllanZyne Nov 14, 2023
8442d4d
UR: llvm license
AllanZyne Nov 14, 2023
4f35b66
UR: llvm license
AllanZyne Nov 14, 2023
21089cc
UR: once
AllanZyne Nov 14, 2023
69407d4
UR: clean code
AllanZyne Nov 14, 2023
0b767bb
UR: clean includes
AllanZyne Nov 14, 2023
232ae72
UR: clean comment
AllanZyne Nov 14, 2023
b9716f4
UR: rename files
AllanZyne Nov 14, 2023
d830a18
UR: update readme
AllanZyne Nov 14, 2023
2c221e9
UR: fix according to PR comments
AllanZyne Nov 15, 2023
3fe33fb
UR: UR_ENABLE_SANITIZER=ON default
AllanZyne Nov 15, 2023
3d58e4b
ignore VS clangd files
AllanZyne Nov 21, 2023
892e85f
fix comments
AllanZyne Nov 21, 2023
6cab044
resolve comments
AllanZyne Nov 21, 2023
0315011
resolve comments
AllanZyne Nov 21, 2023
6ea75ea
Revert "Revert "[UR][CUDA][L0][HIP] Add virtual memory adapter implem…
AllanZyne Nov 30, 2023
cca4e45
Revert "Revert "Remove duplicate CUDA UR_DEVICE_INFO_VIRTUAL_MEMORY_S…
AllanZyne Nov 30, 2023
848c0cf
Revert "Revert "Fix return of check error""
AllanZyne Nov 30, 2023
e53f8d3
Revert "Revert "Fix common include in cuda device.hpp""
AllanZyne Nov 30, 2023
536aaae
Revert "Revert "Zero-initialize CUmemAccessDesc""
AllanZyne Nov 30, 2023
6f8ccdb
Revert "Revert "Add missing newline""
AllanZyne Nov 30, 2023
118190c
Revert "Revert "Fix wrongful use of UR_ASSERT in cuda implementation""
AllanZyne Nov 30, 2023
c1e7b7e
Revert "Revert "an -> a""
AllanZyne Nov 30, 2023
79c3c11
Revert "UR: clean code"
AllanZyne Nov 30, 2023
06bf2aa
add sanitizer test
AllanZyne Dec 7, 2023
9ab8705
refine log
AllanZyne Dec 7, 2023
9b63c18
fix build tests
AllanZyne Dec 7, 2023
2328b48
Merge branch 'main' into sanitizer-pr
AllanZyne Dec 8, 2023
e59d7c7
fix build errors
AllanZyne Dec 8, 2023
bba6f82
add basic test
AllanZyne Dec 8, 2023
f82d196
Merge branch 'sanitizer-pr' into sanitizer-pr-vir
AllanZyne Dec 8, 2023
a084650
fix warning & remove tests
AllanZyne Dec 9, 2023
1148ccb
fix warning
AllanZyne Dec 10, 2023
fa92f72
Merge branch 'main' into sanitizer-pr
AllanZyne Dec 10, 2023
524a83d
fix warning
AllanZyne Dec 10, 2023
c859186
Merge branch 'sanitizer-pr' into sanitizer-pr-vir
AllanZyne Dec 10, 2023
b91e450
fix ur api
AllanZyne Dec 12, 2023
e9a2093
fix fprintf
AllanZyne Dec 12, 2023
a1c4ddc
add some comments
AllanZyne Dec 12, 2023
71d8657
Merge branch 'main' into sanitizer-pr
AllanZyne Dec 13, 2023
02cab8e
Merge branch 'sanitizer-pr' into sanitizer-pr-vir
AllanZyne Dec 13, 2023
621b47e
support local memory
AllanZyne Dec 14, 2023
9fb1eaf
support local memory
AllanZyne Dec 19, 2023
40b5ef6
fix logger
AllanZyne Dec 19, 2023
0b00798
improve logger
AllanZyne Dec 19, 2023
b29930b
Merge branch 'main' into sanitizer-pr
AllanZyne Dec 19, 2023
90e59f9
Merge branch 'sanitizer-pr' into sanitizer-pr-vir
AllanZyne Dec 19, 2023
b6e2776
support cpu
AllanZyne Dec 20, 2023
eacd339
update log
AllanZyne Dec 20, 2023
80bc61b
fix print
AllanZyne Dec 20, 2023
c42bd9a
don't print prefix when logger::Level::QUIET
AllanZyne Dec 21, 2023
bc8cdb2
small fix
AllanZyne Dec 21, 2023
3bede09
small fix
AllanZyne Dec 21, 2023
5dc2d5c
fix KernelNameBuf
AllanZyne Dec 21, 2023
77859ec
Merge branch 'sanitizer-pr' into sanitizer-pr-vir
AllanZyne Dec 21, 2023
d30062e
add usm host/shared
AllanZyne Dec 21, 2023
fa35c5e
fix tests
AllanZyne Dec 21, 2023
916e37e
Add check asan context
AllanZyne Dec 22, 2023
c641b5b
fix local
AllanZyne Dec 23, 2023
c137b68
fix gpu local
AllanZyne Dec 26, 2023
962b08a
fix bug
AllanZyne Dec 26, 2023
c3af871
fix bug
AllanZyne Dec 26, 2023
4f7d2e6
fix local
AllanZyne Dec 27, 2023
8fc8644
fix usm memory
AllanZyne Dec 27, 2023
923352f
check pfnGetKernelSuggestedLocalWorkSizeExp
AllanZyne Dec 27, 2023
5231a5d
clean code format
AllanZyne Dec 28, 2023
17cace2
fix comments
AllanZyne Dec 28, 2023
7dbe46e
clean code
AllanZyne Jan 2, 2024
30c0bc1
follow the review comments
AllanZyne Jan 2, 2024
86d4056
fix build
AllanZyne Jan 2, 2024
49e2f4f
follow the review comments
AllanZyne Jan 2, 2024
79998b9
follow the review comments
AllanZyne Jan 2, 2024
6cc4913
fix urEnqueueKernelLaunch & remove host deviceinfo
AllanZyne Jan 4, 2024
577ddd3
fix build
AllanZyne Jan 5, 2024
4ee0e10
Merge branch 'main' into sanitizer-pr
AllanZyne Jan 5, 2024
90270f8
Merge branch 'sanitizer-pr' into sanitizer-buffer
AllanZyne Jan 8, 2024
6193dbd
fix merge
AllanZyne Jan 8, 2024
dc127d5
fix build
AllanZyne Jan 9, 2024
2f8af13
Merge branch 'sanitizer-pr' into sanitizer-layer
AllanZyne Jan 16, 2024
a1ddc40
fix crash at HostInfo (#9)
AllanZyne Jan 17, 2024
4846d5b
[Sanitizer] Support only device compilation on CPU device (#10)
zhaomaosu Jan 23, 2024
1b57aa6
Merge branch 'main' into sanitizer-layer
AllanZyne Jan 23, 2024
904fb83
fix build
AllanZyne Jan 23, 2024
0255f33
remove urGetKernelSuggestedLocalWorkSize
AllanZyne Jan 25, 2024
7fa003b
remove sanitizer tests
AllanZyne Jan 25, 2024
7cac7c8
add license
AllanZyne Jan 25, 2024
b54b988
clean code
AllanZyne Jan 25, 2024
34d1a9a
clean code
AllanZyne Jan 25, 2024
b00c401
remove Windows and macOS build
AllanZyne Jan 25, 2024
5e3aa7d
fix format
AllanZyne Jan 25, 2024
270e762
refactor cmake
AllanZyne Jan 25, 2024
255f7fa
Add a FIXME message for urKernelSuggestGroupSize
AllanZyne Jan 25, 2024
920a968
Merge branch 'main' into sanitizer-pr-cpu-local
AllanZyne Jan 25, 2024
8e84eec
Poison shadow memory on CPU side by using memset
zhaomaosu Jan 30, 2024
1b688aa
Put linux specific code into linux/san_utils.cpp
zhaomaosu Jan 30, 2024
42d5d10
add check MemSet
AllanZyne Feb 1, 2024
3910b5b
Merge branch 'main' into sanitizer-pr-cpu-local
AllanZyne Feb 1, 2024
0631330
Using LIBC_SO macro
AllanZyne Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,15 @@ if(UR_ENABLE_TRACING)
endif()

if(UR_ENABLE_SANITIZER)
add_compile_definitions(UR_ENABLE_SANITIZER)
if(APPLE)
message(WARNING "Sanitizer layer isn't supported on macOS")
set(UR_ENABLE_SANITIZER OFF)
elseif(WIN32)
message(WARNING "Sanitizer layer isn't supported on Windows")
set(UR_ENABLE_SANITIZER OFF)
else()
add_compile_definitions(UR_ENABLE_SANITIZER)
endif()
endif()

if(UR_USE_ASAN)
Expand Down
7 changes: 7 additions & 0 deletions source/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ if(UR_ENABLE_SANITIZER)
${CMAKE_CURRENT_SOURCE_DIR}/layers/sanitizer/ur_sanitizer_layer.hpp
${CMAKE_CURRENT_SOURCE_DIR}/layers/sanitizer/ur_sanddi.cpp
)

target_sources(ur_loader
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/layers/sanitizer/linux/san_utils.cpp
)

target_include_directories(ur_loader PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/layers/sanitizer"
"${CMAKE_CURRENT_SOURCE_DIR}/../"
)
endif()
Expand Down
Loading
Loading