ONE - On-device Neural Engine
Loading...
Searching...
No Matches
tf2circle Namespace Reference

Functions

void load_customop_conf (const std::string &path, moco::ModelSignature &sig)
 Loads customop.conf into ModelSignature.
 

Function Documentation

◆ load_customop_conf()

void tf2circle::load_customop_conf ( const std::string &  path,
moco::ModelSignature sig 
)

Loads customop.conf into ModelSignature.

Definition at line 120 of file CustomopConfLoader.cpp.

121{
122 CustomOpInfoDef def;
123
124 // TODO Consider Windows
125 cwrap::Fildes fildes{open(path.c_str(), O_RDONLY)};
126
127 if (fildes.get() < 0)
128 {
129 throw std::runtime_error{"Error: " + path + " not found"};
130 }
131
132 if (!load_text(fildes, def))
133 {
134 throw std::runtime_error{"Error: Failed to parse prototxt " + path};
135 }
136
137 add_customop(def, sig);
138}
POSIX File Descriptor.
Definition Fildes.h:29