MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / validateRequiredAttributesExist

Function validateRequiredAttributesExist

plugin/common/plugin.cpp:24–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22{
23
24void validateRequiredAttributesExist(std::set<std::string> requiredFieldNames, PluginFieldCollection const* fc)
25{
26 for (int32_t i = 0; i < fc->nbFields; i++)
27 {
28 requiredFieldNames.erase(fc->fields[i].name);
29 }
30 if (!requiredFieldNames.empty())
31 {
32 std::stringstream msg{};
33 msg << "PluginFieldCollection missing required fields: {";
34 char const* separator = "";
35 for (auto const& field : requiredFieldNames)
36 {
37 msg << separator << field;
38 separator = ", ";
39 }
40 msg << "}";
41 std::string msg_str = msg.str();
42 PLUGIN_ERROR(msg_str.c_str());
43 }
44}
45
46} // namespace plugin
47} // namespace nvinfer1

Callers 15

createPluginMethod · 0.85
createPluginMethod · 0.85
createPluginMethod · 0.85
createPluginMethod · 0.85
initializeFieldsFunction · 0.85
createPluginMethod · 0.85
createPluginMethod · 0.85
createPluginMethod · 0.85
buildBetaAndGammaFunction · 0.85
createPluginMethod · 0.85
createPluginMethod · 0.85
createPluginMethod · 0.85

Calls 2

c_strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected