“2fa8df1cafa2caf4d25d115390c3ca5705c370c4”上不存在“paddle/phi/kernels/impl/selu_grad_kernel_impl.h”
提交 eebf6db2 编写于 作者: B barrierye

rename globel_resp_dict to fetch_buffer in DAGExecutor

上级 999ff630
...@@ -53,7 +53,7 @@ class DAGExecutor(object): ...@@ -53,7 +53,7 @@ class DAGExecutor(object):
self._id_lock = threading.Lock() self._id_lock = threading.Lock()
self._cv = threading.Condition() self._cv = threading.Condition()
self._globel_resp_dict = {} self._fetch_buffer = {}
self._id_counter = 0 self._id_counter = 0
self._reset_max_id = 1000000000000000000 self._reset_max_id = 1000000000000000000
self._is_run = False self._is_run = False
...@@ -106,15 +106,15 @@ class DAGExecutor(object): ...@@ -106,15 +106,15 @@ class DAGExecutor(object):
format(type(channeldata)))) format(type(channeldata))))
with self._cv: with self._cv:
data_id = channeldata.id data_id = channeldata.id
self._globel_resp_dict[data_id] = channeldata self._fetch_buffer[data_id] = channeldata
self._cv.notify_all() self._cv.notify_all()
def _get_channeldata_from_fetch_buffer(self, data_id): def _get_channeldata_from_fetch_buffer(self, data_id):
resp = None resp = None
with self._cv: with self._cv:
while data_id not in self._globel_resp_dict: while data_id not in self._fetch_buffer:
self._cv.wait() self._cv.wait()
resp = self._globel_resp_dict.pop(data_id) resp = self._fetch_buffer.pop(data_id)
self._cv.notify_all() self._cv.notify_all()
return resp return resp
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册