BNNSGraphCompileOptionsSetOutputFD(_:_:)
Sets the option for graph compilation to generate the graph object directly to the specified file descriptor.
Declaration
func BNNSGraphCompileOptionsSetOutputFD(_ options: bnns_graph_compile_options_t, _ fd: Int32)Parameters
- options:
The compilation options object.
- fd:
The destination file descriptor. Pass
-1to reset to the default behavior of strictly in-memory graph generation or the path that Bnnsgraphcompileoptionssetoutputpath(_:_:) specifies.The file that the descriptor indicates must be open for writing. Graph compilation truncates and completely overwrites the file.
Discussion
Use this option to specify that the graph BNNSGraphCompileFromFile(_:_:_:) returns is a read-only memory-mapped file.
The option reduces the memory that compilation requires because BNNS doesn’t require the full set of graph weights to be memory resident.
Note that this option overrides the path that BNNSGraphCompileOptionsSetOutputPath(_:_:) sets.
See Also
Specifying and querying compilation options
bnns_graph_compile_options_tBNNSGraphCompileOptionsMakeDefault()BNNSGraphCompileOptionsDestroy(_:)BNNSGraphCompileOptionsSetOutputPath(_:_:)BNNSGraphCompileOptionsGetOutputPath(_:)BNNSGraphCompileOptionsGetOutputFD(_:)BNNSGraphCompileOptionsSetTargetSingleThread(_:_:)BNNSGraphCompileOptionsGetTargetSingleThread(_:)BNNSGraphCompileOptionsSetOptimizationPreference(_:_:)BNNSGraphCompileOptionsGetOptimizationPreference(_:)BNNSGraphOptimizationPreferenceBNNSGraphCompileOptionsSetGenerateDebugInfo(_:_:)BNNSGraphCompileOptionsGetGenerateDebugInfo(_:)BNNSTargetSystemGeneric