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

[BACKEND] Add Address Sanitizer Pass #5127

Merged
merged 45 commits into from
Jan 3, 2025
Merged
Changes from 2 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5bfcd7f
asan infrastructure
CRobeck Nov 4, 2024
9d63f17
updates
CRobeck Nov 7, 2024
46be959
clean up xnack setting
CRobeck Nov 12, 2024
b3f07ce
clean up
CRobeck Nov 12, 2024
04baac6
clean up
CRobeck Nov 12, 2024
71593ec
Merge branch 'main' into rocm_asan
CRobeck Nov 16, 2024
45ca87d
Merge branch 'main' into rocm_asan
CRobeck Nov 16, 2024
c67b67f
add test, currently disabled
CRobeck Nov 21, 2024
5a2722a
formatting
CRobeck Nov 21, 2024
6c70829
remove stray comments
CRobeck Nov 21, 2024
da56b0e
enable address sanitizer test
CRobeck Dec 2, 2024
6f355c8
fix address sanitizer test
CRobeck Dec 2, 2024
fcfc4b6
fix path error
CRobeck Dec 2, 2024
57dd5bb
Merge branch 'main' into rocm_asan
CRobeck Dec 4, 2024
3be69c0
clean up some test infrastructure
CRobeck Dec 4, 2024
6e62b8c
Merge branch 'rocm_asan' of github.com:CRobeck/triton into rocm_asan
CRobeck Dec 4, 2024
641884c
fix path
CRobeck Dec 4, 2024
37e779c
update test
CRobeck Dec 5, 2024
5b82e60
first attemp to clean up some hard coded paths
CRobeck Dec 6, 2024
f36bdc9
clean up paths
CRobeck Dec 6, 2024
15f2bfd
update env naming
CRobeck Dec 10, 2024
f845ebe
Update README.md
CRobeck Dec 10, 2024
59a082b
update comment
CRobeck Dec 10, 2024
42616d5
Merge branch 'rocm_asan' of github.com:CRobeck/triton into rocm_asan
CRobeck Dec 10, 2024
a821b9b
add some commentary about envs
CRobeck Dec 10, 2024
dfa4bc8
Merge branch 'triton-lang:main' into rocm_asan
CRobeck Dec 10, 2024
9c2693d
Update README.md
CRobeck Dec 10, 2024
3a8bb15
formatting
CRobeck Dec 10, 2024
d7391d2
Merge branch 'rocm_asan' of github.com:CRobeck/triton into rocm_asan
CRobeck Dec 10, 2024
b06b1c4
fix some envs
CRobeck Dec 10, 2024
e9d92ff
move some target specfific code to the backend
CRobeck Dec 12, 2024
50c4505
clean up target specific code
CRobeck Dec 12, 2024
20e72e4
modify ulimit setting for asan test
CRobeck Dec 13, 2024
abed7a3
Update README.md
CRobeck Dec 13, 2024
7970ba5
Update test_address_sanitizer.py comments
CRobeck Dec 13, 2024
f5e0ee9
Merge branch 'main' into rocm_asan
CRobeck Dec 13, 2024
79efc58
add check for asan in disabling compiler multi-threading in MLIR PM
CRobeck Dec 19, 2024
4191437
Merge branch 'rocm_asan' of github.com:CRobeck/triton into rocm_asan
CRobeck Dec 19, 2024
c2c5669
Merge branch 'main' into rocm_asan
CRobeck Dec 20, 2024
e14f03f
Update README.md
CRobeck Dec 25, 2024
09f954e
Update README.md
CRobeck Dec 25, 2024
2a7c52b
Update test_address_sanitizer.py
CRobeck Dec 25, 2024
b02ebad
formatting
CRobeck Dec 25, 2024
edb109e
address review comments
CRobeck Jan 3, 2025
454296b
Merge branch 'main' into rocm_asan
antiagainst Jan 3, 2025
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
3 changes: 2 additions & 1 deletion python/triton/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ def compile(src, target=None, options=None):
# This is needed to safely finalize threads pool inside context: if current process forks before
# python GC deletes context object, thread pool in child process will be invalid, which could
# lead to child crash or hang.
context.disable_multithreading()
if not os.environ.get("TRITON_ENABLE_ASAN", "0") == "1":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should we enable multi-threading?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling multi-threading causes ASAN to create a deadlock. We're still hunting down why.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a TODO here to mention the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

context.disable_multithreading()
# return handle to compiled kernel
return CompiledKernel(src, metadata_group, hash)

Expand Down
Loading