Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs caused by ctypes #29

Merged
merged 1 commit into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/mxnet/c_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ MXNET_DLL int MXSymbolGetAtomicSymbolName(AtomicSymbolCreator creator,
* \param outs The input symbols of the graph.
* \param out_size the number of input symbols returned.
*/
MXNET_DLL int MXSymbolGetInputSymbols(SymbolHandle sym, SymbolHandle **inputs,
MXNET_DLL int MXSymbolGetInputSymbols(SymbolHandle sym, SymbolHandle *inputs,
int *input_size);

/*!
Expand Down
2 changes: 1 addition & 1 deletion python/mxnet/symbol/contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _get_graph_inputs(subg):

syms = []
for i in range(num_handles.value):
s = Symbol(handles[i])
s = Symbol(SymbolHandle(handles[i]))
syms.append(s)
return syms

Expand Down
4 changes: 2 additions & 2 deletions src/c_api/c_api_symbolic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ int MXSymbolGetAtomicSymbolName(AtomicSymbolCreator creator,
API_END();
}

int MXSymbolGetInputSymbols(SymbolHandle sym, SymbolHandle **input_arr, int *input_size) {
int MXSymbolGetInputSymbols(SymbolHandle sym, SymbolHandle *input_arr, int *input_size) {
API_BEGIN();
nnvm::Symbol *s = static_cast<nnvm::Symbol*>(sym);
nnvm::Graph g;
Expand All @@ -366,7 +366,7 @@ int MXSymbolGetInputSymbols(SymbolHandle sym, SymbolHandle **input_arr, int *inp
}
CHECK(input_syms.size() <= max_input_size);
*input_size = input_syms.size();
memcpy(input_arr, input_syms.data(), sizeof(*input_arr) * input_syms.size());
std::copy(input_syms.begin(), input_syms.end(), input_arr);
API_END_HANDLE_ERROR();
}

Expand Down