华为计算微信公众号
昇腾AI开发者公众号
华为计算微博
华为计算今日头条
mindspore 版本:2.2.10
x = 12289 input = ops.arange(x) ops.multinomial(input, 1)
上面的代码
如果 x >= 12289 就会报错。
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/IPython/core/formatters.py:708, in PlainTextFormatter.__call__(self, obj) 701 stream = StringIO() 702 printer = pretty.RepresentationPrinter(stream, self.verbose, 703 self.max_width, self.newline, 704 max_seq_length=self.max_seq_length, 705 singleton_pprinters=self.singleton_printers, 706 type_pprinters=self.type_printers, 707 deferred_pprinters=self.deferred_printers) --> 708 printer.pretty(obj) 709 printer.flush() 710 return stream.getvalue() File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/IPython/lib/pretty.py:410, in RepresentationPrinter.pretty(self, obj) 407 return meth(obj, self, cycle) 408 if cls is not object \ 409 and callable(cls.__dict__.get('__repr__')): --> 410 return _repr_pprint(obj, self, cycle) 412 return _default_pprint(obj, self, cycle) 413 finally: File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/IPython/lib/pretty.py:778, in _repr_pprint(obj, p, cycle) 776 """A pprint that just redirects to the normal repr function.""" 777 # Find newlines and replace them with p.break_() --> 778 output = repr(obj) 779 lines = output.splitlines() 780 with p.group(): File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/mindspore/common/_stub_tensor.py:49, in _stub_method.<locals>.fun(*arg, **kwargs) 47 stub = arg[0] 48 arg = (stub.stub_sync(),) + arg[1:] ---> 49 return method(*arg, **kwargs) File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/mindspore/common/tensor.py:291, in Tensor.__repr__(self) 289 def __repr__(self): 290 if self.init_finished: --> 291 Tensor_.data_sync(self, True) 292 return Tensor_.__repr__(self) 293 return '' RuntimeError: For `Multinomial`, the cuda Kernel fails to run, the error number is 1, which means invalid argument. ---------------------------------------------------- - C++ Call Stack: (For framework developers) ---------------------------------------------------- mindspore/ccsrc/plugin/device/gpu/kernel/math/multinomial_gpu_kernel.cc:96 LaunchKernel
我要发帖子
mindspore 版本:2.2.10
上面的代码
如果 x >= 12289 就会报错。
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/IPython/core/formatters.py:708, in PlainTextFormatter.__call__(self, obj) 701 stream = StringIO() 702 printer = pretty.RepresentationPrinter(stream, self.verbose, 703 self.max_width, self.newline, 704 max_seq_length=self.max_seq_length, 705 singleton_pprinters=self.singleton_printers, 706 type_pprinters=self.type_printers, 707 deferred_pprinters=self.deferred_printers) --> 708 printer.pretty(obj) 709 printer.flush() 710 return stream.getvalue() File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/IPython/lib/pretty.py:410, in RepresentationPrinter.pretty(self, obj) 407 return meth(obj, self, cycle) 408 if cls is not object \ 409 and callable(cls.__dict__.get('__repr__')): --> 410 return _repr_pprint(obj, self, cycle) 412 return _default_pprint(obj, self, cycle) 413 finally: File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/IPython/lib/pretty.py:778, in _repr_pprint(obj, p, cycle) 776 """A pprint that just redirects to the normal repr function.""" 777 # Find newlines and replace them with p.break_() --> 778 output = repr(obj) 779 lines = output.splitlines() 780 with p.group(): File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/mindspore/common/_stub_tensor.py:49, in _stub_method.<locals>.fun(*arg, **kwargs) 47 stub = arg[0] 48 arg = (stub.stub_sync(),) + arg[1:] ---> 49 return method(*arg, **kwargs) File /media/aaa/data/softs/envs/ms/lib/python3.9/site-packages/mindspore/common/tensor.py:291, in Tensor.__repr__(self) 289 def __repr__(self): 290 if self.init_finished: --> 291 Tensor_.data_sync(self, True) 292 return Tensor_.__repr__(self) 293 return '' RuntimeError: For `Multinomial`, the cuda Kernel fails to run, the error number is 1, which means invalid argument. ---------------------------------------------------- - C++ Call Stack: (For framework developers) ---------------------------------------------------- mindspore/ccsrc/plugin/device/gpu/kernel/math/multinomial_gpu_kernel.cc:96 LaunchKernel