@@ -54,26 +54,26 @@ at::Tensor gen_aten_tensor_by(dil::tensor&& dil_tensor) {
54
54
shade_data_context->dil_tensor = std::forward<dil::tensor>(dil_tensor);
55
55
shade_data_context->data_type = cpu::SHADE_DATA_TYPE::DIL;
56
56
void *tensor_data = nullptr ;
57
- if (dil_tensor. is_public_format ()) {
57
+ if (shade_data_context-> dil_tensor -> is_public_format ()) {
58
58
// The buffer of a tensor with public format is shared between CPU and DNNL
59
- tensor_data = dil_tensor. get_data_handle ();
60
- shade_data_context->cpu_raw_data = dil_tensor. get_data_handle ();
59
+ tensor_data = shade_data_context-> dil_tensor -> get_data_handle ();
60
+ shade_data_context->cpu_raw_data = shade_data_context-> dil_tensor -> get_data_handle ();
61
61
shade_data_context->cpu_del_fun = &(c10::detail::deleteNothing);
62
62
}
63
63
c10::DataPtr shade_data_ptr (
64
64
tensor_data,
65
65
shade_data_context,
66
66
cpu::ShadeDataContext::freeShadeDataContext,
67
67
at::DeviceType::DPCPP);
68
- auto at_data_type = get_at_data_type (dil_tensor. get_data_type ());
68
+ auto at_data_type = get_at_data_type (shade_data_context-> dil_tensor -> get_data_type ());
69
69
auto storage_impl = c10::make_intrusive<at::StorageImpl>(
70
70
at::scalarTypeToTypeMeta (at_data_type),
71
- dil_tensor. get_nelems (),
71
+ shade_data_context-> dil_tensor -> get_nelems (),
72
72
std::move (shade_data_ptr),
73
73
nullptr ,
74
74
/* resizeable=*/ false );
75
75
auto _tensor = at::detail::make_tensor<torch_ipex::IPEXTensorImpl>(storage_impl, at::DispatchKey::DPCPPTensorId);
76
- dbl::comm::sync_shape_from_dil_to_aten (_tensor, dil_tensor);
76
+ dbl::comm::sync_shape_from_dil_to_aten (_tensor, shade_data_context-> dil_tensor . value () );
77
77
TORCH_INTERNAL_ASSERT_DEBUG_ONLY (_tensor.layout () == c10::kStrided );
78
78
return _tensor;
79
79
}
0 commit comments