Fix AMD by changing from GetTensorData<T>() to GetTensorMutableData<T>()
This commit is contained in:
@@ -759,7 +759,7 @@ namespace ANSCENTER {
|
||||
std::vector<Object> ANSONNXPOSE::postprocess(
|
||||
const cv::Size& originalImageSize,
|
||||
const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::string& camera_id)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(_mutex);
|
||||
@@ -773,7 +773,9 @@ namespace ANSCENTER {
|
||||
return {};
|
||||
}
|
||||
|
||||
const float* rawOutput = outputTensors[0].GetTensorData<float>();
|
||||
// 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>();
|
||||
if (!rawOutput) {
|
||||
this->_logger.LogError("ANSONNXPOSE::postprocess", "rawOutput pointer is null", __FILE__, __LINE__);
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user