File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ module GPUCompiler
33using LLVM
44using LLVM. Interop
55
6- using Tracy
76
87using ExprTools: splitdef, combinedef
98
@@ -13,6 +12,26 @@ using Serialization
1312using Scratch: @get_scratch!
1413using Preferences
1514
15+ const ENABLE_TRACY = parse (Bool, @load_preference (" tracy" , " false" ))
16+
17+ """
18+ enable_tracy!(state::Bool=true)
19+
20+ Activate tracy in the current environment.
21+ You will need to restart your Julia environment for it to take effect.
22+ """
23+ function enable_tracy! (state:: Bool = true )
24+ @set_preferences! (" tracy" => string (state))
25+ end
26+
27+ if ENABLE_TRACY
28+ using Tracy
29+ else
30+ macro tracepoint (name, expr)
31+ return esc (expr)
32+ end
33+ end
34+
1635const CC = Core. Compiler
1736using Core: MethodInstance, CodeInstance, CodeInfo
1837
@@ -65,7 +84,9 @@ function __init__()
6584 mkpath (dir)
6685 global compile_cache = dir
6786
68- Tracy. @register_tracepoints ()
87+ @static if ENABLE_TRACY
88+ Tracy. @register_tracepoints ()
89+ end
6990 register_deferred_codegen ()
7091end
7192
Original file line number Diff line number Diff line change 11using Aqua
22
3- Aqua. test_all (GPUCompiler)
3+ Aqua. test_all (GPUCompiler;
4+ stale_deps= (ignore= [:Tracy ],),)
You can’t perform that action at this time.
0 commit comments