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

Softmax raises exception for zero-size tensor on GPU #17792

@xidulu

Description

@xidulu

As title

(base) ubuntu@ip-172-31-44-52:~/mxnet_master_develop$ MXNET_ENGINE_TYPE=NaiveEngine python
Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 21:52:21)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mxnet import np, npx
>>> npx.set_np()
>>> a = np.random.rand(4, 0, 5, 2, ctx=npx.gpu(0))
[07:26:28] ../src/base.cc:51: Upgrade advisory: this mxnet has been built against cuda library version 9000, which is older than the oldest version tested by CI (10000).  Set MXNET_CUDA_LIB_CHECKING=0 to quiet this warning.
[07:26:28] ../src/base.cc:84: Upgrade advisory: this mxnet has been built against cuDNN lib version 7301, which is older than the oldest version tested by CI (7600).  Set MXNET_CUDNN_LIB_CHECKING=0 to quiet this warning.
[07:26:28] ../src/engine/engine.cc:55: MXNet start using engine: NaiveEngine
>>> npx.log_softmax(a, -1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 62, in log_softmax
  File "/home/ubuntu/mxnet_master_develop/python/mxnet/_ctypes/ndarray.py", line 91, in _imperative_invoke
    ctypes.byref(out_stypes)))
  File "/home/ubuntu/mxnet_master_develop/python/mxnet/base.py", line 246, in check_call
    raise get_last_ffi_error()
mxnet.base.MXNetError: Traceback (most recent call last):
  File "../src/operator/nn/./softmax-inl.h", line 427
Name: Check failed: err == cudaSuccess (9 vs. 0) : softmax_stride1_compute_kernel ErrStr:invalid configuration argument

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions