Skip to content

Commit 4d3f54d

Browse files
authored
Merge pull request #23 from alibuild/alibot-cleanup-14117
Please consider the following formatting changes to #14117
2 parents 938a1ed + 7b07496 commit 4d3f54d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Common/ML/src/OrtInterface.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void OrtModel::memoryOnDevice(int32_t deviceIndex)
144144
(pImplOrt->runOptions).AddConfigEntry("disable_synchronize_execution_providers", "1");
145145
(pImplOrt->sessionOptions).AddConfigEntry("session.use_device_allocator_for_initializers", "1"); // See kOrtSessionOptionsUseDeviceAllocatorForInitializers, https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h
146146
(pImplOrt->sessionOptions).AddConfigEntry("session.use_env_allocators", "1"); // This should enable to use the volatile memory allocation defined in O2/GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerHost.cxx; not working yet: ONNX still assigns new memory at init time
147-
(pImplOrt->sessionOptions).AddConfigEntry("session_options.enable_cpu_mem_arena", "0"); // This should enable to use the volatile memory allocation defined in O2/GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerHost.cxx; not working yet: ONNX still assigns new memory at init time
147+
(pImplOrt->sessionOptions).AddConfigEntry("session_options.enable_cpu_mem_arena", "0"); // This should enable to use the volatile memory allocation defined in O2/GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerHost.cxx; not working yet: ONNX still assigns new memory at init time
148148
// Arena memory shrinkage comes at performance cost
149149
/// For now prefer to use single allocation, enabled by O2/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu -> SetONNXGPUStream -> rocm_options.arena_extend_strategy = 0;
150150
// (pImplOrt->runOptions).AddConfigEntry("memory.enable_memory_arena_shrinkage", ("gpu:" + std::to_string(deviceIndex)).c_str()); // See kOrtRunOptionsConfigEnableMemoryArenaShrinkage, https://github.com/microsoft/onnxruntime/blob/90c263f471bbce724e77d8e62831d3a9fa838b2f/include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h#L27

GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerHost.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,12 @@ void GPUTPCNNClusterizerHost::volatileOrtAllocator(Ort::Env* env, Ort::MemoryInf
205205
memInfo = (Ort::MemoryInfo*)mockedAlloc->Info();
206206
}
207207

208-
const OrtMemoryInfo* GPUTPCNNClusterizerHost::getMockedMemoryInfo() {
208+
const OrtMemoryInfo* GPUTPCNNClusterizerHost::getMockedMemoryInfo()
209+
{
209210
return mockedAlloc->Info();
210211
}
211212

212-
MockedOrtAllocator* GPUTPCNNClusterizerHost::getMockedAllocator() {
213+
MockedOrtAllocator* GPUTPCNNClusterizerHost::getMockedAllocator()
214+
{
213215
return mockedAlloc.get();
214216
}

0 commit comments

Comments
 (0)