DickJC123 commented on a change in pull request #20443:
URL: https://github.com/apache/incubator-mxnet/pull/20443#discussion_r669079602
##########
File path: src/common/rtc.cc
##########
@@ -44,8 +44,8 @@ CudaModule::Chunk::Chunk(
<< "For lower version of CUDA, please prepend your kernel defintiions "
<< "with extern \"C\" instead.";
#endif
- std::vector<const char*> c_options(options.size());
- for (const auto& i : options) c_options.emplace_back(i.c_str());
+ std::vector<const char*> c_options;
+ for (const auto& i : options) c_options.push_back(i.c_str());
Review comment:
This is a bug fix. The original code path creates a vector twice the
desired size.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]