forked from mindspore-Ecosystem/mindspore
bug fix
This commit is contained in:
parent
4b98342ca1
commit
806ceab605
|
@ -68,6 +68,10 @@ public class ModelParallelRunner {
|
|||
rwLock.writeLock().unlock();
|
||||
return false;
|
||||
}
|
||||
if (modelParallelRunnerPtr != 0L){
|
||||
rwLock.writeLock().unlock();
|
||||
return true;
|
||||
}
|
||||
modelParallelRunnerPtr = this.init(modelPath, runnerConfig.getRunnerConfigPtr());
|
||||
rwLock.writeLock().unlock();
|
||||
return modelParallelRunnerPtr != 0L;
|
||||
|
@ -85,6 +89,10 @@ public class ModelParallelRunner {
|
|||
rwLock.writeLock().unlock();
|
||||
return false;
|
||||
}
|
||||
if (modelParallelRunnerPtr != 0L){
|
||||
rwLock.writeLock().unlock();
|
||||
return true;
|
||||
}
|
||||
modelParallelRunnerPtr = this.init(modelPath, 0L);
|
||||
rwLock.writeLock().unlock();
|
||||
return modelParallelRunnerPtr != 0;
|
||||
|
|
|
@ -204,6 +204,10 @@ Status ResourceManager::DistinguishPhysicalAndLogicalByNuma(std::vector<std::vec
|
|||
}
|
||||
|
||||
void InitWorkerThread::Destroy() {
|
||||
if (model_worker_ != nullptr) {
|
||||
predict_task_queue_->SetPredictTaskDone();
|
||||
predict_task_queue_ = nullptr;
|
||||
}
|
||||
std::unique_lock<std::mutex> l(mtx_init_);
|
||||
is_destroy_ = true;
|
||||
is_launch_ = true;
|
||||
|
|
Loading…
Reference in New Issue