forked from mindspore-Ecosystem/mindspore
!45858 [MS][LITE][RUNNER] bugfix
Merge pull request !45858 from yefeng/469-fix_bug
This commit is contained in:
commit
255fe929e5
|
@ -68,6 +68,10 @@ public class ModelParallelRunner {
|
||||||
rwLock.writeLock().unlock();
|
rwLock.writeLock().unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (modelParallelRunnerPtr != 0L){
|
||||||
|
rwLock.writeLock().unlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
modelParallelRunnerPtr = this.init(modelPath, runnerConfig.getRunnerConfigPtr());
|
modelParallelRunnerPtr = this.init(modelPath, runnerConfig.getRunnerConfigPtr());
|
||||||
rwLock.writeLock().unlock();
|
rwLock.writeLock().unlock();
|
||||||
return modelParallelRunnerPtr != 0L;
|
return modelParallelRunnerPtr != 0L;
|
||||||
|
@ -85,6 +89,10 @@ public class ModelParallelRunner {
|
||||||
rwLock.writeLock().unlock();
|
rwLock.writeLock().unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (modelParallelRunnerPtr != 0L){
|
||||||
|
rwLock.writeLock().unlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
modelParallelRunnerPtr = this.init(modelPath, 0L);
|
modelParallelRunnerPtr = this.init(modelPath, 0L);
|
||||||
rwLock.writeLock().unlock();
|
rwLock.writeLock().unlock();
|
||||||
return modelParallelRunnerPtr != 0;
|
return modelParallelRunnerPtr != 0;
|
||||||
|
|
|
@ -204,6 +204,10 @@ Status ResourceManager::DistinguishPhysicalAndLogicalByNuma(std::vector<std::vec
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitWorkerThread::Destroy() {
|
void InitWorkerThread::Destroy() {
|
||||||
|
if (model_worker_ != nullptr) {
|
||||||
|
predict_task_queue_->SetPredictTaskDone();
|
||||||
|
predict_task_queue_ = nullptr;
|
||||||
|
}
|
||||||
std::unique_lock<std::mutex> l(mtx_init_);
|
std::unique_lock<std::mutex> l(mtx_init_);
|
||||||
is_destroy_ = true;
|
is_destroy_ = true;
|
||||||
is_launch_ = true;
|
is_launch_ = true;
|
||||||
|
|
Loading…
Reference in New Issue