forked from mindspore-Ecosystem/mindspore
!31758 restore testcase bug of broadcastto op
Merge pull request !31758 from wangyanling/master
This commit is contained in:
commit
4f480138d5
|
@ -141,7 +141,7 @@ bool BroadcastToCpuKernelMod::LaunchKernel(const std::vector<AddressPtr> &inputs
|
|||
std::vector<KernelAttr> BroadcastToCpuKernelMod::GetOpSupport() {
|
||||
auto iter = func_list_.find(kernel_type_);
|
||||
if (iter == func_list_.end()) {
|
||||
MS_LOG(EXCEPTION) << "Does not support " << kernel_type_ << "!";
|
||||
MS_LOG(EXCEPTION) << "not support " << kernel_type_ << "!";
|
||||
}
|
||||
|
||||
std::vector<KernelAttr> support_list;
|
||||
|
|
|
@ -115,5 +115,5 @@ def test_broadcast_dyn_invalid_init():
|
|||
context.set_context(mode=context.GRAPH_MODE, device_target='CPU')
|
||||
ms_shape = (2, -1, 4, 5)
|
||||
x_np = np.random.rand(4, 5).astype(np.float32)
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(ValueError) or pytest.raises(RuntimeError):
|
||||
P.BroadcastTo(ms_shape)(Tensor(x_np))
|
||||
|
|
Loading…
Reference in New Issue