未验证 提交 b5ec9ca0 编写于 作者: A Allen Guo 提交者: GitHub

upgrade to sdk2.5.1 (#42950)

* upgrade to sdk2.5.1
上级 d4cdfa55
...@@ -74,11 +74,7 @@ void IpuBackend::WeightsToHost() { executor_->WeightsToHost(); } ...@@ -74,11 +74,7 @@ void IpuBackend::WeightsToHost() { executor_->WeightsToHost(); }
void IpuBackend::Detach() { executor_->Detach(); } void IpuBackend::Detach() { executor_->Detach(); }
void IpuBackend::Reset() { void IpuBackend::Reset() { executor_->Reset(); }
executor_->Detach();
compiler_.reset();
executor_.reset();
}
void IpuBackend::SetScope(const framework::Scope& scope) { void IpuBackend::SetScope(const framework::Scope& scope) {
scope_ = &scope; scope_ = &scope;
......
...@@ -88,11 +88,7 @@ class PdIArray final : public popart::IArray { ...@@ -88,11 +88,7 @@ class PdIArray final : public popart::IArray {
} // namespace } // namespace
Executor::~Executor() { Executor::~Executor() { Reset(); }
Detach();
session_.reset();
executor_resources_.reset();
}
void Executor::Prepare(const std::string &proto) { void Executor::Prepare(const std::string &proto) {
VLOG(10) << "enter Executor::Prepare"; VLOG(10) << "enter Executor::Prepare";
...@@ -299,6 +295,12 @@ void Executor::Detach() { ...@@ -299,6 +295,12 @@ void Executor::Detach() {
} }
} }
void Executor::Reset() {
Detach();
session_.reset();
executor_resources_.reset();
}
void Executor::SetWeightsIO() { void Executor::SetWeightsIO() {
auto opt_type = compiler_resources_->optimizer_type; auto opt_type = compiler_resources_->optimizer_type;
VLOG(10) << "SetWeightsIO for " << opt_type; VLOG(10) << "SetWeightsIO for " << opt_type;
......
...@@ -63,6 +63,9 @@ class Executor { ...@@ -63,6 +63,9 @@ class Executor {
// Detach IPU // Detach IPU
void Detach(); void Detach();
// Reset session
void Reset();
// Scope // Scope
void SetScope(const Scope *scope) { scope_ = scope; } void SetScope(const Scope *scope) { scope_ = scope; }
......
...@@ -128,6 +128,11 @@ class IPUOpTest(IPUTest): ...@@ -128,6 +128,11 @@ class IPUOpTest(IPUTest):
cls.fetch_list: List[str] = None cls.fetch_list: List[str] = None
cls.output_dict: Optional[Dict] = {} cls.output_dict: Optional[Dict] = {}
def tearDown(self):
# Manual reset when using ipumodel
if self.use_ipumodel():
paddle.framework.core.IpuBackend.get_instance().reset()
@property @property
def fp16_enabled(self): def fp16_enabled(self):
return True return True
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# run a container # run a container
# docker run --ulimit memlock=-1:-1 --net=host --cap-add=IPC_LOCK --device=/dev/infiniband/ --ipc=host --rm -it paddlepaddle/paddle:latest-dev-ipu bash # docker run --ulimit memlock=-1:-1 --net=host --cap-add=IPC_LOCK --device=/dev/infiniband/ --ipc=host --rm -it paddlepaddle/paddle:latest-dev-ipu bash
FROM graphcore/poplar-extbaidu:2.5.0-ubuntu-18.04-20220407 FROM graphcore/poplar:2.5.1
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
# ENV variables # ENV variables
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册