Skip to content

Commit 1b16e38

Browse files
authored
Revert "check dtype before convert to dil tensor and add backend" (#92)
This reverts commit 37b4256.
1 parent 37b4256 commit 1b16e38

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

torch_ipex/csrc/cpu/dbl/Common.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ namespace dbl {
1717
namespace comm {
1818

1919
dil::tensor dil_tensor_from_dense(const at::Tensor& tensor) {
20-
TORCH_CHECK(
20+
AT_ASSERTM(
2121
tensor.layout() == at::Layout::Strided,
22-
"dil_tensor_from_dense expects dense tensor input");
23-
TORCH_CHECK(tensor.scalar_type() == at::ScalarType::Float
24-
"dil_tensor_from_dense expects tensor of at::ScalarType::Float");
25-
TORCH_CHECK(tensor.dim() <= 5,
26-
"Can't convert cpu tensor with the number of dimensions > 5");
22+
"dil_tensor_view_from_dense expects dense tensor input");
2723
at::ScalarType cur_type = tensor.scalar_type();
2824
return {tensor.sizes().vec(), get_dil_data_type(cur_type), tensor.strides().vec(), tensor.data_ptr()};
2925
}

0 commit comments

Comments
 (0)