Skip to content

Commit 4ef35fc

Browse files
committed
Found the stream allocation issue. Now starting optimizations
1 parent 007a4a1 commit 4ef35fc

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Common/ML/include/ML/OrtInterface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class OrtModel
5555
void initEnvironment();
5656
bool isInitialized() { return mInitialized; }
5757
Ort::SessionOptions& updateSessionOptions();
58+
Ort::MemoryInfo& updateMemoryInfo();
5859
void setIO();
5960

6061
virtual ~OrtModel() = default;

Common/ML/src/OrtInterface.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ Ort::SessionOptions& OrtModel::updateSessionOptions()
4040
return pImplOrt->sessionOptions;
4141
}
4242

43+
Ort::MemoryInfo& OrtModel::updateMemoryInfo()
44+
{
45+
return pImplOrt->memoryInfo;
46+
}
47+
4348
void OrtModel::initOptions(std::unordered_map<std::string, std::string> optionsMap)
4449
{
4550
pImplOrt = new OrtVariables();

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -697,16 +697,11 @@ void GPUReconstructionHIP::SetONNXGPUStream(Ort::SessionOptions& session_options
697697
const auto& api = Ort::GetApi();
698698
// api.GetCurrentGpuDeviceId(deviceId);
699699
OrtROCMProviderOptions rocm_options;
700-
LOG(info) << "Creating ROCm provider options";
701-
// rocm_options.has_user_compute_stream = 1; // Indicate that we are passing a user stream
702-
// LOG(info) << "Setting user compute stream";
703-
// rocm_options.user_compute_stream = &(mInternals->Streams[stream]);
704-
// LOG(info) << "Stream is set with streamId " << stream << " and reference " << &(mInternals->Streams[stream]);
700+
rocm_options.has_user_compute_stream = 1; // Indicate that we are passing a user stream
701+
rocm_options.user_compute_stream = mInternals->Streams[stream];
705702
session_options.AppendExecutionProvider_ROCM(rocm_options);
706-
LOG(info) << "Appending ROCm provider options";
707703
// OrtSessionOptionsAppendExecutionProvider_ROCM(session_options, *deviceId);
708704
// api.ReleaseROCMProviderOptions(rocm_options);
709-
LOG(info) << "Releasing ROCm provider options";
710705
}
711706

712707
#endif // GPUCA_HAS_ONNX

GPU/GPUTracking/Global/GPUChainTrackingClusterizer.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,6 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
988988

989989
auto stop0 = std::chrono::high_resolution_clock::now();
990990
auto start1 = std::chrono::high_resolution_clock::now();
991-
LOG(info) << "ONNX stream set. Device ID is " << deviceId << " for stream " << lane;
992991
nnApplication.networkInference(nnApplication.model_class, clustererNNShadow, iSize, clustererNNShadow.modelProbabilities, clustererNNShadow.nnInferenceInputDType, deviceId);
993992
if (nnApplication.model_class.getNumOutputNodes()[0][1] == 1) {
994993
runKernel<GPUTPCNNClusterizerKernels, GPUTPCNNClusterizerKernels::determineClass1Labels>({GetGrid(iSize, lane), krnlRunRangeNone}, iSector, clustererNNShadow.nnInferenceInputDType, withMC, batchStart); // Assigning class labels

0 commit comments

Comments
 (0)