Skip to content

Commit 9461942

Browse files
committed
init tracing layer after sanitizer layer
1 parent 76361a8 commit 9461942

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source/loader/ur_lib.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,15 @@ class __urdlllocal context_t : public AtomicSingleton<context_t> {
7474
const std::vector<LayerData> layers = {
7575
{ur_validation_layer::getContext(),
7676
ur_validation_layer::context_t::forceDelete},
77-
#if UR_ENABLE_TRACING
78-
{ur_tracing_layer::getContext(),
79-
ur_tracing_layer::context_t::forceDelete},
80-
#endif
77+
// Initialize tracing layer after sanitizer layer to make sure tracing
78+
// layer will properly print all API calls.
8179
#if UR_ENABLE_SANITIZER
8280
{ur_sanitizer_layer::getContext(),
8381
ur_sanitizer_layer::context_t::forceDelete},
82+
#endif
83+
#if UR_ENABLE_TRACING
84+
{ur_tracing_layer::getContext(),
85+
ur_tracing_layer::context_t::forceDelete},
8486
#endif
8587
};
8688

0 commit comments

Comments
 (0)