mxnet
Functions
c_api_test.h File Reference

C API of mxnet for ease of testing backend in Python. More...

#include <mxnet/c_api.h>
Include dependency graph for c_api_test.h:

Go to the source code of this file.

Functions

MXNET_DLL int MXBuildSubgraphByOpNames (SymbolHandle sym_handle, const char *prop_name, const uint32_t num_ops, const char **op_names, SymbolHandle *ret_sym_handle)
 Inhibit C++ name-mangling for MXNet functions. More...
 
MXNET_DLL int MXSetSubgraphPropertyOpNames (const char *prop_name, const uint32_t num_ops, const char **op_names)
 Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph property, instead of the predefined one. This is only for the purpose of testing. More...
 
MXNET_DLL int MXSetSubgraphPropertyOpNamesV2 (const char *prop_name, const uint32_t num_ops, const char **op_names)
 Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph property, instead of the predefined one. This is only for the purpose of testing. Compared to MXSetSubgraphPropertyOpNames(), this API will add op_names to the backend property. More...
 
MXNET_DLL int MXRemoveSubgraphPropertyOpNames (const char *prop_name)
 Given a subgraph property name, delete the op name set in the SubgraphPropertyOpNameSet. More...
 
MXNET_DLL int MXRemoveSubgraphPropertyOpNamesV2 (const char *prop_name)
 Given a subgraph property name, remove op_names attribute of the in the SubgraphBackend property. More...
 
MXNET_DLL int MXGetEnv (const char *name, const char **value)
 Get the value of an environment variable as seen by the backend. More...
 
MXNET_DLL int MXSetEnv (const char *name, const char *value)
 Set the value of an environment variable from the backend. More...
 

Detailed Description

C API of mxnet for ease of testing backend in Python.

Copyright (c) 2018 by Contributors

Function Documentation

◆ MXBuildSubgraphByOpNames()

MXNET_DLL int MXBuildSubgraphByOpNames ( SymbolHandle  sym_handle,
const char *  prop_name,
const uint32_t  num_ops,
const char **  op_names,
SymbolHandle ret_sym_handle 
)

Inhibit C++ name-mangling for MXNet functions.

This API partitions a graph only by the operator names provided by users. This will attach a DefaultSubgraphProperty to the input graph for partitioning. This function should be used only for the testing purpose.

◆ MXGetEnv()

MXNET_DLL int MXGetEnv ( const char *  name,
const char **  value 
)

Get the value of an environment variable as seen by the backend.

Parameters
nameThe name of the environment variable
valueThe returned value of the environment variable

◆ MXRemoveSubgraphPropertyOpNames()

MXNET_DLL int MXRemoveSubgraphPropertyOpNames ( const char *  prop_name)

Given a subgraph property name, delete the op name set in the SubgraphPropertyOpNameSet.

◆ MXRemoveSubgraphPropertyOpNamesV2()

MXNET_DLL int MXRemoveSubgraphPropertyOpNamesV2 ( const char *  prop_name)

Given a subgraph property name, remove op_names attribute of the in the SubgraphBackend property.

◆ MXSetEnv()

MXNET_DLL int MXSetEnv ( const char *  name,
const char *  value 
)

Set the value of an environment variable from the backend.

Parameters
nameThe name of the environment variable
valueThe desired value to set the environment variable name

◆ MXSetSubgraphPropertyOpNames()

MXNET_DLL int MXSetSubgraphPropertyOpNames ( const char *  prop_name,
const uint32_t  num_ops,
const char **  op_names 
)

Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph property, instead of the predefined one. This is only for the purpose of testing.

◆ MXSetSubgraphPropertyOpNamesV2()

MXNET_DLL int MXSetSubgraphPropertyOpNamesV2 ( const char *  prop_name,
const uint32_t  num_ops,
const char **  op_names 
)

Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph property, instead of the predefined one. This is only for the purpose of testing. Compared to MXSetSubgraphPropertyOpNames(), this API will add op_names to the backend property.