torch_mlu/csrc/aten/core/tensor_impl.cpp
bool MLUTensorImpl::is_empty() {
  if (!cpu_storage_ || !storage_)
    return true;

  if (storage_.data() == nullptr && cpu_storage_.data() == nullptr)
    return true;

  return false;
}
// the logic of this function comes from MLUTensorImpl::cpu_data(), although
// not so faithfully. by the time of writing, it is used exclusively by the
// fallback-to-cpu feature, to denote the case where empty_like() should replace
// copy_()
// if is_empty() were to be applied alsewhere, the logic may need to be refined,
// but now we will leave it as is because when entering this function from
// inputConvertAndPushTensor(), the tensor is already verified as 'defined'
the logic of this function comes from MLUTensorImpl::cpu_data(), although
not so faithfully. by the time of writing, it is used exclusively by the
fallback-to-cpu feature, to denote the case where empty_like() should replace
copy_()
if is_empty() were to be applied alsewhere, the logic may need to be refined,
but now we will leave it as is because when entering this function from
inputConvertAndPushTensor(), the tensor is already verified as 'defined'
the logic of this function comes from MLUTensorImpl :: cpu_data () although not so faithfully . by the time of writing it is used exclusively by the fallback - to - cpu feature to denote the case where empty_like () should replace copy_ () if is_empty () were to be applied alsewhere the logic may need to be refined but now we will leave it as is because when entering this function from inputConvertAndPushTensor () the tensor is already verified as ' defined '
bool MLUTensorImpl::is_empty() {
  if (!cpu_storage_ || !storage_)
    return true;
  if (storage_.data() == nullptr && cpu_storage_.data() == nullptr)
    return true;
  return false;
}
bool MLUTensorImpl :: is_empty ( ) { if ( ! cpu_storage_ || ! storage_ ) return true ; if ( storage_ . data ( ) == nullptr && cpu_storage_ . data ( ) == nullptr ) return true ; return false ; }
the logic of this function comes from MLUTensorImpl::cpu_data(), although
not so faithfully.
the logic of this function comes from MLUTensorImpl :: cpu_data () although not so faithfully .