BNNSGraphCompileOptionsSetOutputPath(_:_:)
Sets the option for graph compilation to generate the graph object directly to the specified file.
Declaration
func BNNSGraphCompileOptionsSetOutputPath(_ options: bnns_graph_compile_options_t, _ path: UnsafePointer<CChar>?)Parameters
- options:
The compilation options object.
- path:
The destination file path. Pass
nilto reset to the default behavior of strictly in-memory graph generation.
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.
The generated file has 0600 permissions (read and write by the user only).
Note that the BNNSGraphCompileOptionsSetOutputFD(_:_:) function overrides this option.
See Also
Specifying and querying compilation options
bnns_graph_compile_options_tBNNSGraphCompileOptionsMakeDefault()BNNSGraphCompileOptionsDestroy(_:)BNNSGraphCompileOptionsGetOutputPath(_:)BNNSGraphCompileOptionsSetOutputFD(_:_:)BNNSGraphCompileOptionsGetOutputFD(_:)BNNSGraphCompileOptionsSetTargetSingleThread(_:_:)BNNSGraphCompileOptionsGetTargetSingleThread(_:)BNNSGraphCompileOptionsSetOptimizationPreference(_:_:)BNNSGraphCompileOptionsGetOptimizationPreference(_:)BNNSGraphOptimizationPreferenceBNNSGraphCompileOptionsSetGenerateDebugInfo(_:_:)BNNSGraphCompileOptionsGetGenerateDebugInfo(_:)BNNSTargetSystemGeneric