Fix AMD by changing from GetTensorData<T>() to GetTensorMutableData<T>()
This commit is contained in:
@@ -518,14 +518,16 @@ namespace ANSCENTER {
|
||||
}
|
||||
}
|
||||
std::vector<Object> YOLO12OD::postprocess(const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
float confThreshold, float iouThreshold)
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
float confThreshold, float iouThreshold)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(_mutex);
|
||||
try {
|
||||
|
||||
std::vector<Object> detections;
|
||||
const float* rawOutput = outputTensors[0].GetTensorData<float>(); // Extract raw output data from the first output tensor
|
||||
// GetTensorMutableData (not GetTensorData) on DML — const variant
|
||||
// hangs on AMD after ~8 calls. Read-only despite the name.
|
||||
const float* rawOutput = outputTensors[0].GetTensorMutableData<float>();
|
||||
const std::vector<int64_t> outputShape = outputTensors[0].GetTensorTypeAndShapeInfo().GetShape();
|
||||
|
||||
// Determine the number of features and detections
|
||||
|
||||
Reference in New Issue
Block a user