File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,6 @@ ur_result_t umf2urResult(umf_result_t umfResult) {
49
49
}
50
50
51
51
usm::DisjointPoolAllConfigs InitializeDisjointPoolConfig () {
52
- const char *PoolUrConfigVal = std::getenv (" SYCL_PI_LEVEL_ZERO_USM_ALLOCATOR" );
53
- const char *PoolPiConfigVal = std::getenv (" UR_L0_USM_ALLOCATOR" );
54
- const char *PoolConfigVal =
55
- PoolUrConfigVal ? PoolUrConfigVal : PoolPiConfigVal;
56
- if (PoolConfigVal == nullptr ) {
57
- return usm::DisjointPoolAllConfigs ();
58
- }
59
-
60
52
const char *PoolUrTraceVal = std::getenv (" UR_L0_USM_ALLOCATOR_TRACE" );
61
53
const char *PoolPiTraceVal =
62
54
std::getenv (" SYCL_PI_LEVEL_ZERO_USM_ALLOCATOR_TRACE" );
@@ -69,6 +61,14 @@ usm::DisjointPoolAllConfigs InitializeDisjointPoolConfig() {
69
61
PoolTrace = std::atoi (PoolTraceVal);
70
62
}
71
63
64
+ const char *PoolUrConfigVal = std::getenv (" SYCL_PI_LEVEL_ZERO_USM_ALLOCATOR" );
65
+ const char *PoolPiConfigVal = std::getenv (" UR_L0_USM_ALLOCATOR" );
66
+ const char *PoolConfigVal =
67
+ PoolUrConfigVal ? PoolUrConfigVal : PoolPiConfigVal;
68
+ if (PoolConfigVal == nullptr ) {
69
+ return usm::DisjointPoolAllConfigs (PoolTrace);
70
+ }
71
+
72
72
return usm::parseDisjointPoolConfig (PoolConfigVal, PoolTrace);
73
73
}
74
74
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ constexpr auto operator""_GB(unsigned long long x) -> size_t {
24
24
return x * 1024 * 1024 * 1024 ;
25
25
}
26
26
27
- DisjointPoolAllConfigs::DisjointPoolAllConfigs () {
27
+ DisjointPoolAllConfigs::DisjointPoolAllConfigs (int trace ) {
28
28
Configs[DisjointPoolMemType::Host].name = " Host" ;
29
29
Configs[DisjointPoolMemType::Device].name = " Device" ;
30
30
Configs[DisjointPoolMemType::Shared].name = " Shared" ;
@@ -58,6 +58,10 @@ DisjointPoolAllConfigs::DisjointPoolAllConfigs() {
58
58
Configs[DisjointPoolMemType::SharedReadOnly].MaxPoolableSize = 4_MB;
59
59
Configs[DisjointPoolMemType::SharedReadOnly].Capacity = 4 ;
60
60
Configs[DisjointPoolMemType::SharedReadOnly].SlabMinSize = 2_MB;
61
+
62
+ for (auto &Config : Configs) {
63
+ Config.PoolTrace = trace;
64
+ }
61
65
}
62
66
63
67
DisjointPoolAllConfigs parseDisjointPoolConfig (const std::string &config,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class DisjointPoolAllConfigs {
23
23
size_t EnableBuffers = 1 ;
24
24
DisjointPoolConfig Configs[DisjointPoolMemType::All];
25
25
26
- DisjointPoolAllConfigs ();
26
+ DisjointPoolAllConfigs (int trace = 0 );
27
27
};
28
28
29
29
// Parse optional config parameters of this form:
You can’t perform that action at this time.
0 commit comments