Skip to content

Commit 1206fe2

Browse files
committed
Remove redundant condition for reordering a tensor to a specified scalar type
1 parent 2c74d11 commit 1206fe2

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

torch_ipex/csrc/aten_ipex_bridge.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,6 @@ std::vector<at::Tensor> shallowFallbackToCPUTensorList(const at::TensorList& ten
497497

498498

499499
void reorderTensorToScalarTypeForDNNL(const at::Tensor& ipexTensor, at::ScalarType dstScalarType) {
500-
if (ipexTensor.device().type() == at::DeviceType::CPU) {
501-
return reorderTensorToScalaraType(ipexTensor, dstScalarType);
502-
}
503-
504500
TORCH_CHECK(dstScalarType == at::kBFloat16 || dstScalarType == at::kFloat);
505501
auto tensor_dtype = ipexTensor.scalar_type();
506502
TORCH_CHECK(tensor_dtype == at::kBFloat16 || tensor_dtype == at::kFloat);

0 commit comments

Comments
 (0)