Home
last modified time | relevance | path

Searched refs:device_shape (Results 1 – 7 of 7) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/common/
Dtrans.cc252 std::vector<size_t> device_shape; in NhwcDeviceShape() local
253 device_shape.push_back(shape[kN]); in NhwcDeviceShape()
254 device_shape.push_back(shape[kH]); in NhwcDeviceShape()
255 device_shape.push_back(shape[kW]); in NhwcDeviceShape()
256 device_shape.push_back(shape[kC]); in NhwcDeviceShape()
257 return device_shape; in NhwcDeviceShape()
264 std::vector<int64_t> device_shape; in NhwcDeviceDynamicShape() local
265 device_shape.push_back(shape[kN]); in NhwcDeviceDynamicShape()
266 device_shape.push_back(shape[kH]); in NhwcDeviceDynamicShape()
267 device_shape.push_back(shape[kW]); in NhwcDeviceDynamicShape()
[all …]
Dtrans.h67 std::vector<size_t> device_shape; member
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/akg/
Dakg_kernel_json_decoder.cc51 …static ShapeVector GetFakeAbstractShape(const ShapeVector &device_shape, const std::string &format… in GetFakeAbstractShape() argument
58 return device_shape; in GetFakeAbstractShape()
63 return device_shape; in GetFakeAbstractShape()
65 return iter->second(device_shape); in GetFakeAbstractShape()
69 static ShapeVector NchwAbstractShape(const ShapeVector &device_shape) { return device_shape; } in NchwAbstractShape() argument
70 static ShapeVector NhwcAbstractShape(const ShapeVector &device_shape) { in NhwcAbstractShape() argument
71 if (device_shape.size() != 4) { in NhwcAbstractShape()
72 MS_LOG(EXCEPTION) << "Shape size of NHWC should be 4, but got " << device_shape.size(); in NhwcAbstractShape()
74 return {device_shape[0], device_shape[3], device_shape[1], device_shape[2]}; in NhwcAbstractShape()
76 static ShapeVector FractalNzAbstractShape(const ShapeVector &device_shape) { in FractalNzAbstractShape() argument
[all …]
Dakg_kernel_json_decoder.h45 ShapeVector GetFakeAbstractShape(const ShapeVector &device_shape, const std::string &format);
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/
Dascend_device_address.cc243 std::vector<size_t> device_shape; in GetDeviceShape() local
246device_shape = trans::TransShapeToDevice(*host_shape, format_, node_index.first, node_index.second… in GetDeviceShape()
254device_shape = trans::TransShapeToDevice(*host_shape, format_, node_index.first, node_index.second… in GetDeviceShape()
256 return device_shape; in GetDeviceShape()
318 std::vector<size_t> device_shape = GetDeviceShape(&host_shape); in SyncDeviceToHostAndConvertFormat() local
334 host_shape, device_shape, type_id_}; in SyncDeviceToHostAndConvertFormat()
350 host_shape, device_shape, type_id_}; in SyncDeviceToHostAndConvertFormat()
441 std::vector<size_t> device_shape; in ConvertFormatAndSyncHostToDevice() local
443device_shape = trans::TransShapeToDevice(host_shape, format_, node_index.first, node_index.second); in ConvertFormatAndSyncHostToDevice()
446device_shape = trans::TransShapeToDevice(host_shape, format_, node_index.first, node_index.second); in ConvertFormatAndSyncHostToDevice()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/
Dgraph_kernel_helper.cc170 auto device_shape = GetDeviceShape(scalar_tensor_node); in ReplaceTensorWithScalar() local
171 SetNodeAttrSafely("shape", MakeValue(device_shape), broadcast_node); in ReplaceTensorWithScalar()
640 auto device_shape = AnfAlgo::GetOutputDeviceShape(node, 0); in GetDeviceShape() local
641 if (device_shape.empty()) { in GetDeviceShape()
644 …(void)std::transform(device_shape.begin(), device_shape.end(), std::back_inserter(res_device_shape… in GetDeviceShape()
/third_party/mindspore/mindspore/ccsrc/backend/session/
Danf_runtime_algorithm.cc2129 auto device_shape = GetInputDeviceShape(anf_node, index); in GetInputRealDeviceShapeIfExist() local
2131 if (AnfUtils::IsShapeDynamic(device_shape)) { in GetInputRealDeviceShapeIfExist()
2133 std::transform(max_shape.begin(), max_shape.end(), device_shape.begin(), IntToSize); in GetInputRealDeviceShapeIfExist()
2135 (void)trans::TransShapeToDevice(device_shape, format, anf_node, index, false); in GetInputRealDeviceShapeIfExist()
2137 return device_shape; in GetInputRealDeviceShapeIfExist()
2141 auto device_shape = GetOutputDeviceShape(anf_node, index); in GetOutputRealDeviceShapeIfExist() local
2143 if (AnfUtils::IsShapeDynamic(device_shape)) { in GetOutputRealDeviceShapeIfExist()
2145 std::transform(max_shape.begin(), max_shape.end(), device_shape.begin(), IntToSize); in GetOutputRealDeviceShapeIfExist()
2147 (void)trans::TransShapeToDevice(device_shape, format, anf_node, index); in GetOutputRealDeviceShapeIfExist()
2149 return device_shape; in GetOutputRealDeviceShapeIfExist()