You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
(A clear and concise description of what the bug is.)
用C接口初始化一个模型,然后多线程去调用这个模型出bug。
后面查出来是这个文件下src/executor/graph_executor.cc的 1398行
/*
rshape = graph_.MoveCopyAttrmxnet::ShapeVector("shape"); /
他会把shape这个这个属性给erase掉,然后别的线程再跑到这行就报错,目前已经把1398行改成
/
if(is_train){
rshape = graph_.MoveCopyAttrmxnet::ShapeVector("shape");
}
else{
rshape = graph_.CopyAttrmxnet::ShapeVector("shape");
}
template
inline T Graph::CopyAttr(const std::string& attr_name) {
auto it = attrs.find(attr_name);
CHECK(it != attrs.end())
<< "Cannot find attribute " << attr_name << " in the graph";
std::shared_ptr sptr = it->second;
// attrs.erase(it);
if (sptr.unique()) {
return std::move(nnvm::get(*sptr));
} else {
return nnvm::get(*sptr);
}
}
*/
Error Message
(Paste the complete error message. Please also include stack trace by setting environment variable DMLC_LOG_STACK_TRACE_DEPTH=10 before running your script.)
To Reproduce
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)
Steps to reproduce
(Paste the commands you ran that produced the error.)
What have you tried to solve it?
Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:
@p517332051 thread safety is not yet guaranteed on all C APis and executors. In 2.0 we dropped support for graph executor in favor of the cached op as the only executor. There is a thread-safe version of it from #16431
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
(A clear and concise description of what the bug is.)
用C接口初始化一个模型,然后多线程去调用这个模型出bug。
后面查出来是这个文件下src/executor/graph_executor.cc的 1398行
/*
rshape = graph_.MoveCopyAttrmxnet::ShapeVector("shape");
/
他会把shape这个这个属性给erase掉,然后别的线程再跑到这行就报错,目前已经把1398行改成
/
if(is_train){
rshape = graph_.MoveCopyAttrmxnet::ShapeVector("shape");
}
else{
rshape = graph_.CopyAttrmxnet::ShapeVector("shape");
}
template
inline T Graph::CopyAttr(const std::string& attr_name) {
auto it = attrs.find(attr_name);
CHECK(it != attrs.end())
<< "Cannot find attribute " << attr_name << " in the graph";
std::shared_ptr sptr = it->second;
// attrs.erase(it);
if (sptr.unique()) {
return std::move(nnvm::get(*sptr));
} else {
return nnvm::get(*sptr);
}
}
*/
Error Message
(Paste the complete error message. Please also include stack trace by setting environment variable
DMLC_LOG_STACK_TRACE_DEPTH=10
before running your script.)To Reproduce
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)
Steps to reproduce
(Paste the commands you ran that produced the error.)
What have you tried to solve it?
Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:
The text was updated successfully, but these errors were encountered: