@@ -1242,42 +1242,15 @@ torch::lazy::Value XLATensor::MaybeCastIrValue(
12421242}
12431243
12441244XLATensorPtr XLATensor::CreateFrom (torch::lazy::Value ir_value) const {
1245- ir_value = MaybeCastIrValue (std::move (ir_value), GetDevice (),
1246- /* logical_element_type=*/ c10::nullopt );
12471245 return Create (std::move (ir_value), GetDevice (), dtype_optional ());
12481246}
12491247
1250- XLATensorPtr XLATensor::CreateFrom (
1251- torch::lazy::Value ir_value,
1252- const torch::lazy::BackendDevice& device) const {
1253- ir_value = MaybeCastIrValue (std::move (ir_value), device,
1254- /* logical_element_type=*/ c10::nullopt );
1255- return Create (std::move (ir_value), device, dtype_optional ());
1256- }
1257-
1258- XLATensorPtr XLATensor::CreateFrom (torch::lazy::Value ir_value,
1259- at::ScalarType logical_element_type) const {
1260- ir_value =
1261- MaybeCastIrValue (std::move (ir_value), GetDevice (), logical_element_type);
1262- return Create (std::move (ir_value), GetDevice (), logical_element_type);
1263- }
1264-
12651248XLATensorPtr XLATensor::CreateFrom (
12661249 torch::lazy::Value ir_value,
12671250 c10::optional<at::ScalarType> logical_element_type_opt) const {
1268- ir_value = MaybeCastIrValue (std::move (ir_value), GetDevice (),
1269- logical_element_type_opt);
12701251 return Create (std::move (ir_value), GetDevice (), logical_element_type_opt);
12711252}
12721253
1273- XLATensorPtr XLATensor::CreateFrom (torch::lazy::Value ir_value,
1274- const torch::lazy::BackendDevice& device,
1275- at::ScalarType logical_element_type) const {
1276- ir_value =
1277- MaybeCastIrValue (std::move (ir_value), device, logical_element_type);
1278- return Create (std::move (ir_value), device, logical_element_type);
1279- }
1280-
12811254void XLATensor::ApplyPendingGraph () {
12821255 DeviceBarrier (GetDevice ());
12831256 // This method is called to ensure that the tensor data is available on
0 commit comments