apeforest commented on a change in pull request #15593: Large Index Support for 
Slice
URL: https://github.com/apache/incubator-mxnet/pull/15593#discussion_r310781490
 
 

 ##########
 File path: python/mxnet/ndarray/ndarray.py
 ##########
 @@ -131,14 +133,24 @@ def _new_alloc_handle(shape, ctx, delay_alloc, 
dtype=mx_real_t):
         A new empty `NDArray` handle.
     """
     hdl = NDArrayHandle()
-    check_call(_LIB.MXNDArrayCreateEx(
-        c_array_buf(mx_uint, native_array('I', shape)),
-        mx_uint(len(shape)),
-        ctypes.c_int(ctx.device_typeid),
-        ctypes.c_int(ctx.device_id),
-        ctypes.c_int(int(delay_alloc)),
-        ctypes.c_int(int(_DTYPE_NP_TO_MX[np.dtype(dtype).type])),
-        ctypes.byref(hdl)))
+    if Features().is_enabled('INT64_TENSOR_SIZE') and sys.version_info[0] > 2:
 
 Review comment:
   It's better to do this in this PR as @larroy suggested. Otherwise, we would 
see performance degradation for everything in python 3

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to