sxjscience commented on issue #12310: Flaky test: test_ndarray.test_order URL: https://github.com/apache/incubator-mxnet/issues/12310#issuecomment-428914285 The bug is caused by memory misalignment. As stated in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#device-memory-accesses , CUDA device memory must be aligned. Currently, we slice a `char *` object to generate pointers of other dtypes. In this process, we haven't aligned these ptrs correctly. This triggers the "CUDA: misaligned address" error. This is a common mistake in many other implementations. The ultimate solution would be a helper function for allocating spaces for tensors with different dtypes and shapes, which could be added here https://github.com/apache/incubator-mxnet/blob/master/include/mxnet/resource.h#L152-L159. For now, I'll submit a PR to fix this problem for topk.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
