Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

fix travis #21

Merged
merged 3 commits into from
Aug 20, 2015
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ addons:
- gcc-4.8
- g++-4.8
- clang
- python-numpy

before_install:
- export NVCC_PREFIX=${HOME}
Expand Down
4 changes: 3 additions & 1 deletion include/mxnet/c_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ typedef void *AtomicSymbolHandle;
typedef void *ExecutorHandle;
/*! \brief handle to a DataIterator */
typedef void *DataIterHandle;
/*
/*!
* \brief return str message of the last error
* all function in this file will return 0 when success
* and -1 when an error occured,
Expand Down Expand Up @@ -389,6 +389,8 @@ MXNET_DLL int MXExecutorHeads(ExecutorHandle handle,
* \brief Generate Executor from symbol
*
* \param symbol_handle symbol handle
* \param dev_mask device mask
* \param dev_id device id
* \param len length
* \param in_args in args array
* \param arg_grad_store arg grads handle array
Expand Down
2 changes: 1 addition & 1 deletion include/mxnet/narray.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class NArray {
CHECK_GE(shape_[0], end) << "Chunk is smaller than required";
size_t length = 1;
if (shape_.ndim() == 1) {
ret.offset_= begin;
ret.offset_ = begin;
} else {
for (index_t i = 1; i < shape_.ndim(); ++i) {
length *= shape_[i];
Expand Down
3 changes: 2 additions & 1 deletion python/mxnet/executor.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# coding: utf-8
# pylint: disable=invalid-name, protected-access, too-many-locals, fixme
""" code for executor. """
from __future__ import absolute_import

import ctypes
from .base import _LIB
from .base import c_array, c_str, mx_uint, NArrayHandle, ExecutorHandle
from .base import c_array, mx_uint, NArrayHandle, ExecutorHandle
from .base import check_call
from .narray import NArray

Expand Down
2 changes: 1 addition & 1 deletion python/mxnet/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def __init__(self):
ctypes.byref(plist)))
hmap = {}
for i in range(size.value):
hdl = plist[i]
hdl = ctypes.c_void_p(plist[i])
name = ctypes.c_char_p()
check_call(_LIB.MXFuncGetName(hdl, ctypes.byref(name)))
hmap[name.value] = _Function(hdl, name.value)
Expand Down
3 changes: 1 addition & 2 deletions python/mxnet/symbol.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# coding: utf-8
# pylint: disable=invalid-name, protected-access, too-many-locals
# pylint: disable=invalid-name, protected-access, too-many-locals, fixme
"""Symbol support of mxnet"""
from __future__ import absolute_import

import ctypes
from .base import _LIB
from .base import c_array, c_str, mx_uint, NArrayHandle, ExecutorHandle, SymbolHandle
from .base import check_call
from .narray import NArray
from .context import Context
from .executor import Executor

Expand Down
5 changes: 3 additions & 2 deletions python/mxnet/symbol_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ def __init__(self):
ctypes.byref(plist)))
hmap = {}
for i in range(size.value):
hdl = ctypes.c_void_p(plist[i])
name = ctypes.c_char_p()
check_call(_LIB.MXSymbolGetAtomicSymbolName(plist[i], ctypes.byref(name)))
hmap[name.value] = _SymbolCreator(name, plist[i])
check_call(_LIB.MXSymbolGetAtomicSymbolName(hdl, ctypes.byref(name)))
hmap[name.value] = _SymbolCreator(name, hdl)
self.__dict__.update(hmap)

def Variable(self, name):
Expand Down
1 change: 1 addition & 0 deletions src/symbol/graph_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <mxnet/symbolic.h>
#include <memory>
#include <string>
#include <vector>
#include <utility>
#include "./graph_memory_allocator.h"
Expand Down