diff --git "a/docs/zh/PyTorch API\346\224\257\346\214\201\346\270\205\345\215\225_1.5.0.md" "b/docs/zh/PyTorch API\346\224\257\346\214\201\346\270\205\345\215\225_1.5.0.md"
index ec95cc153c0f391ca7b3e085990fd6fb48796651..31c03490c4743e1cc9d7aefd4f6734f5884b5bba 100644
--- "a/docs/zh/PyTorch API\346\224\257\346\214\201\346\270\205\345\215\225_1.5.0.md"
+++ "b/docs/zh/PyTorch API\346\224\257\346\214\201\346\270\205\345\215\225_1.5.0.md"
@@ -787,8 +787,20 @@
| 120 | torch.nn.BatchNorm2d | 是 |
| 121 | torch.nn.BatchNorm3d | 是 |
| 122 | torch.nn.GroupNorm | 是 |
-| 123 | torch.nn.SyncBatchNorm | 否 |
+| 123 | torch.nn.SyncBatchNorm | 是 |
+<<<<<<< HEAD
+<<<<<<< HEAD
+<<<<<<< HEAD
+| 124 | torch.nn.SyncBatchNorm.convert_sync_batchnorm | 是 |
+=======
| 124 | torch.nn.SyncBatchNorm.convert_sync_batchnorm | 否 |
+>>>>>>> 34d323c (new api support)
+=======
+| 124 | torch.nn.SyncBatchNorm.convert_sync_batchnorm | 是 |
+>>>>>>> 0585771 (new api support)
+=======
+| 124 | torch.nn.SyncBatchNorm.convert_sync_batchnorm | 是 |
+>>>>>>> ba861db (new file)
| 125 | torch.nn.InstanceNorm1d | 是 |
| 126 | torch.nn.InstanceNorm2d | 是 |
| 127 | torch.nn.InstanceNorm3d | 是 |
@@ -1289,9 +1301,7 @@ torch.npu.set_device()接口只支持在程序开始的位置通过set_device进
详细算子接口说明:
-> ```
> npu_apply_adam(beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad, use_locking, use_nesterov, out = (var, m, v))
-> ```
count adam result.
@@ -1317,58 +1327,1969 @@ count adam result.
None
-> npu_bert_apply_adam(lr, beta1, beta2, epsilon, grad, max_grad_norm, global_grad_norm, weight_decay, out = (var, m, v))
+> npu_convolution_transpose(input, weight, bias, padding, output_padding, stride, dilation, groups) -> Tensor
-count adam result in bert.
+Applies a 2D or 3D transposed convolution operator over an input image composed of several input planes, sometimes also called “deconvolution”.
- Parameters:
- - **lr** (Number) - learning rate.
- - **beta1** (Number) - exponential decay rate for the 1st moment estimates.
- - **beta2** (Number) - exponential decay rate for the 2nd moment estimates.
- - **epsilon** (Number) - term added to the denominator to improve numerical stability.
- - **grad** (Tensor) - the gradient.
- - **max_grad_norm** (Number) - maximum norm for the gradients.
- - **global_grad_norm** (Number) - L2_norm for the gradients.
- - **weight_decay** (Number) - weight decay
- - **var** (Tensor) - variables to be optimized.
- - **m** (Tensor) -mean value of variables.
- - **v** (Tensor) - variance of variables.
+ - **input** (Tensor) - input tensor of shape(minibatch, in_channels, iH, iW) or (minibatch, in_channels, iT, iH, iW)
+ - **weight** (Tensor) - filters of shape(in_channels, out_channels/groups, kH, kW) or (in_channels, out_channels/groups, kT, kH, kW)
+ - **bias** (Tensor, optional) - optional bias of shape(out_channels)
+ - **padding** (ListInt) - (dilation * (kernel_size - 1) - padding) zero-padding will be added to both sides of each dimension in the input
+ - **output_padding** (ListInt) - additional size added to one side of each dimension in the output shape.
+ - **stride** (ListInt) - the stride of the convolving kernel
+ - **dilation** (ListInt) - the spacing between kernel elements
+ - **groups** (Number) - split input into groups, in_channels should be divisible by the number of groups
+
+- constraints:
+
+ None
+
+- Examples:
+
+ None
+
+> npu_conv_transpose2d(input, weight, bias, padding, output_padding, stride, dilation, groups) -> Tensor
+
+Applies a 2D transposed convolution operator over an input image composed of several input planes, sometimes also called “deconvolution”.
+
+- Parameters:
+ - **input** (Tensor) - input tensor of shape(minibatch, in_channels, iH, iW)
+ - **weight** (Tensor) - filters of shape(in_channels, out_channels/groups, kH, kW)
+ - **bias** (Tensor, optional) - optional bias of shape(out_channels)
+ - **padding** (ListInt) - (dilation * (kernel_size - 1) - padding) zero-padding will be added to both sides of each dimension in the input
+ - **output_padding** (ListInt) - additional size added to one side of each dimension in the output shape.
+ - **stride** (ListInt) - the stride of the convolving kernel
+ - **dilation** (ListInt) - the spacing between kernel elements
+ - **groups** (Number) - split input into groups, in_channels should be divisible by the number of groups
+
+- constraints:
+
+ None
+
+- Examples:
+
+ None
+
+> npu_convolution(input, weight, bias, stride, padding, dilation, groups) -> Tensor
+
+Applies a 2D or 3D convolution over an input image composed of several input planes.
+
+- Parameters:
+ - **input** (Tensor) - input tensor of shape(minibatch, in_channels, iH, iW) or (minibatch, in_channels, iT, iH, iW)
+ - **weight** (Tensor) - filters of shape(out_channels, in_channels/groups, kH, kW) or (out_channels, in_channels/groups, kT, kH, kW)
+ - **bias** (Tensor, optional) - optional bias of shape(out_channels)
+ - **stride** (ListInt) - the stride of the convolving kernel
+ - **padding** (ListInt) - implicit paddings on both sides of the input
+ - **dilation** (ListInt) - the spacing between kernel elements
+ - **groups** (ListInt) - split input into groups, in_channels should be divisible by the number of groups
+
+- constraints:
+
+ None
+
+- Examples:
+
+ None
+
+> npu_conv2d(input, weight, bias, stride, padding, dilation, groups) -> Tensor
+
+Applies a 2D convolution over an input image composed of several input planes.
+
+- Parameters:
+ - **input** (Tensor) - input tensor of shape(minibatch, in_channels, iH, iW)
+ - **weight** (Tensor) - filters of shape(out_channels, in_channels/groups, kH, kW)
+ - **bias** (Tensor, optional) - optional bias of shape(out_channels)
+ - **stride** (ListInt) - the stride of the convolving kernel
+ - **padding** (ListInt) - implicit paddings on both sides of the input
+ - **dilation** (ListInt) - the spacing between kernel elements
+ - **groups** (ListInt) - split input into groups, in_channels should be divisible by the number of groups
+
+- constraints:
+
+ None
+
+- Examples:
+
+ None
+
+> npu_conv3d(input, weight, bias, stride, padding, dilation, groups) -> Tensor
+
+Applies a 3D convolution over an input image composed of several input planes.
+
+- Parameters:
+ - **input** (Tensor) - input tensor of shape(minibatch, in_channels, iT, iH, iW)
+ - **weight** (Tensor) - filters of shape(out_channels, in_channels/groups, kT, kH, kW)
+ - **bias** (Tensor, optional) - optional bias of shape(out_channels)
+ - **stride** (ListInt) - the stride of the convolving kernel
+ - **padding** (ListInt) - implicit paddings on both sides of the input
+ - **dilation** (ListInt) - the spacing between kernel elements
+ - **groups** (ListInt) - split input into groups, in_channels should be divisible by the number of groups
+
+- constraints:
+
+ None
+
+- Examples:
+
+ None
+
+> one_(self) -> Tensor
+
+Fills self tensor with ones.
+
+- Parameters:
+
+- **self** (Tensor) - input tensor
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(2, 3).npu()
+ >>> x
+ tensor([[0.6072, 0.9726, 0.3475],
+ [0.3717, 0.6135, 0.6788]], device='npu:0')
+ >>> x.one_()
+ tensor([[1., 1., 1.],
+ [1., 1., 1.]], device='npu:0')
+ ```
+
+> npu_sort_v2(self, dim=-1, descending=False, out=None) -> Tensor
+
+Sorts the elements of the input tensor along a given dimension in ascending order by value without indices.
+If dim is not given, the last dimension of the input is chosen.
+If descending is True then the elements are sorted in descending order by value.
+
+- Parameters:
+ - **self** (Tensor) - the input tensor
+ - **dim** (int, optional) - the dimension to sort along
+ - **descending** (bool, optional) - controls the sorting order (ascending or descending)
+ - **out** (Tensor, optional) - the output that can be optionally given to be used as output buffers
+
+- constraints:
+
+ At present only support the last dim(-1).
+
+- Examples:
+
+ ```python
+ >>> x = torch.randn(3, 4).npu()
+ >>> x
+ tensor([[-0.0067, 1.7790, 0.5031, -1.7217],
+ [ 1.1685, -1.0486, -0.2938, 1.3241],
+ [ 0.1880, -2.7447, 1.3976, 0.7380]], device='npu:0')
+ >>> sorted_x = torch.npu_sort_v2(x)
+ >>> sorted_x
+ tensor([[-1.7217, -0.0067, 0.5029, 1.7793],
+ [-1.0488, -0.2937, 1.1689, 1.3242],
+ [-2.7441, 0.1880, 0.7378, 1.3975]], device='npu:0')
+ ```
+
+> npu_format_cast(self, acl_format) -> Tensor
+
+Change the format of a npu tensor.
+
+- Parameters:
+ - **self** (Tensor) - the input tensor
+ - **acl_format** (int) - the target format to transform
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(2, 3, 4, 5).npu()
+ >>> x.storage().npu_format()
+ 0
+ >>> x1 = x.npu_format_cast(29)
+ >>> x1.storage().npu_format()
+ 29
+ ```
+
+> npu_format_cast_
+
+> npu_format_cast_.acl_format(self, acl_format) -> Tensor
+
+ In-place version of npu_format_cast()
+
+> npu_format_cast_.src(self, src) -> Tensor
+
+ In-place Change the format of self, with the same format as src.
+
+ - Parameters:
+ - **self** (Tensor) - the input tensor
+ - **src** (Tensor) - the target format to transform
+
+ - constraints:
+
+ None
+
+ - Examples:
+
+ ```python
+ >>> x = torch.rand(2, 3, 4, 5).npu()
+ >>> x.storage().npu_format()
+ 0
+ >>> x.npu_format_cast_(29).storage().npu_format()
+ 29
+ ```
+
+> npu_transpose(self, perm) -> Tensor
+
+Returns a view of the original tensor with its dimensions permuted, and make the result contiguous.
+
+- Parameters:
+ - **self** (Tensor) - the input tensor
+ - **perm** (ListInt) - The desired ordering of dimensions
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.randn(2, 3, 5).npu()
+ >>> x.shape
+ torch.Size([2, 3, 5])
+ >>> x1 = torch.npu_transpose(x, (2, 0, 1))
+ >>> x1.shape
+ torch.Size([5, 2, 3])
+ >>> x2 = x.npu_transpose(2, 0, 1)
+ >>> x2.shape
+ torch.Size([5, 2, 3])
+ ```
+
+> npu_broadcast(self, perm) -> Tensor
+
+Returns a new view of the self tensor with singleton dimensions expanded to a larger size, and make the result contiguous.
+
+Tensor can be also expanded to a larger number of dimensions, and the new ones will be appended at the front.
+
+- Parameters:
+ - **self** (Tensor) - the input tensor
+ - **perm** (ListInt) - the desired expanded size
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.tensor([[1], [2], [3]]).npu()
+ >>> x.shape
+ torch.Size([3, 1])
+ >>> x.npu_broadcast(3, 4)
+ tensor([[1, 1, 1, 1],
+ [2, 2, 2, 2],
+ [3, 3, 3, 3]], device='npu:0')
+ ```
+
+> npu_dtype_cast(input, dtype) -> Tensor
+
+Performs Tensor dtype conversion.
+
+- Parameters:
+ - **input** (Tensor) - the input tensor.
+ - **dtype** (torch.dtype) - the desired data type of returned Tensor.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> torch. npu_dtype_cast (torch.tensor([0, 0.5, -1.]).npu(), dtype=torch.int)
+ tensor([ 0, 0, -1], device='npu:0', dtype=torch.int32)
+ ```
+
+> empty_with_format(size, dtype, layout, device, pin_memory, acl_format) -> Tensor
+
+Returns a tensor filled with uninitialized data. The shape of the tensor is defined by the variable argument size. The format of the tensor is defined by the variable argument acl_format.
+
+- Parameters:
+
+ - **size** (int...) – a sequence of integers defining the shape of the output tensor. Can be a variable number of arguments or a collection like a list or tuple.
+
+ - **dtype** (torch.dtype, optional) – the desired data type of returned tensor. Default: if None, uses a global default (see torch.set_default_tensor_type()).
+
+ - **layout** (torch.layout, optional) – the desired layout of returned Tensor. Default: None.
+
+ - **device** (torch.device, optional) – the desired device of returned tensor. Default: None
+
+ - **pin_memory** (bool, optional) – If set, returned tensor would be allocated in the pinned memory. Default: None.
+
+ - **acl_format** (Number) – the desired memory format of returned Tensor. Default: 2.
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> torch.empty_with_format((2, 3), dtype=torch.float32, device="npu")
+ tensor([[1., 1., 1.],
+ [1., 1., 1.]], device='npu:0')
+ ```
+
+> copy_memory_(dst, src, non_blocking=False) -> Tensor
+
+Copies the elements from src into self tensor and returns self.
+
+- Parameters:
+ - **dst** (Tensor) - the source tensor to copy from.
+ - **src** (Tensor) - the desired data type of returned Tensor.
+ - **non_blocking** (bool) - if True and this copy is between CPU and NPU, the copy may occur asynchronously with respect to the host. For other cases, this argument has no effect.
+
+- constraints:
+
+ copy_memory_ only support npu tensor.
+ input tensors of copy_memory_ should have same dtype.
+ input tensors of copy_memory_ should have same device index.
+
+- Examples:
+
+ ```python
+ >>> a=torch.IntTensor([0, 0, -1]).npu()
+ >>> b=torch.IntTensor([1, 1, 1]).npu()
+ >>> a.copy_memory_(b)
+ tensor([1, 1, 1], device='npu:0', dtype=torch.int32)
+ ```
+
+> npu_one_hot(input, num_classes=-1, depth=1, on_value=1, off_value=0) -> Tensor
+
+Returns a one-hot tensor. The locations represented by index in "x" take value "on_value", while all other locations take value "off_value".
+
+- Parameters:
+ - **input** (Tensor) - class values of any shape.
+ - **num_classes** (Tensor) - The axis to fill. Defaults to "-1".
+ - **depth** (Number) - The depth of the one hot dimension.
+ - **on_value** (Number) - The value to fill in output when indices[j] = i.
+ - **off_value** (Number) - The value to fill in output when indices[j] != i.
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> a=torch.IntTensor([5, 3, 2, 1]).npu()
+ >>> b=torch.npu_one_hot(a, depth=5)
+ >>> b
+ tensor([[0., 0., 0., 0., 0.],
+ [0., 0., 0., 1., 0.],
+ [0., 0., 1., 0., 0.],
+ [0., 1., 0., 0., 0.]], device='npu:0')
+ ```
+
+> npu_stride_add(x1, x2, offset1, offset2, c1_len) -> Tensor
+
+Add the partial values of two tensors in format NC1HWC0.
+
+- Parameters:
+ - **x1** (Tensor) - A Tensor in 5HD.
+ - **x2** (Tensor) - A Tensor of the same type as "x1", and the same shape as "x1", except for the C1 value.
+ - **offset1** (Number) - A required int. Offset value of C1 in "x1".
+ - **offset2** (Number) - A required int. Offset value of C1 in "x2".
+ - **c1_len** (Number) - A required int. C1 len of "y". The value must be less than the difference between C1 and offset in "x1" and "x2".
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> a=torch.tensor([[[[[1.]]]]]).npu()
+ >>> b=torch.npu_stride_add(a, a, 0, 0, 1)
+ >>> b
+ tensor([[[[[2.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]],
+ [[[0.]]]]], device='npu:0')
+ ```
+
+> npu_softmax_cross_entropy_with_logits(features, labels) -> Tensor
+
+Computes softmax cross entropy cost.
+
+- Parameters:
+ - **features** (Tensor) - A Tensor. A "batch_size * num_classes" matrix.
+ - **labels** (Tensor) - A Tensor of the same type as "features". A "batch_size * num_classes" matrix.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ None
+
+> npu_ps_roi_pooling(x, rois, spatial_scale, group_size, output_dim) -> Tensor
+
+Performs Position Sensitive PS ROI Pooling.
+
+- Parameters:
+ - **x** (Tensor) - An NC1HWC0 tensor, describing the feature map, dimension C1 must be equal to (int(output_dim+15)/C0))*group_size*group_size.
+ - **rois** (Tensor) - A tensor with shape [batch, 5, rois_num], describing the ROIs, each ROI consists of five elements: "batch_id", "x1", "y1", "x2", and "y2", which "batch_id" indicates the index of the input feature map, "x1", "y1", "x2", or "y2" must be greater than or equal to "0.0".
+ - **spatial_scale** (Number) - A required float32, scaling factor for mapping the input coordinates to the ROI coordinates .
+ - **group_size** (Number) - A required int32, specifying the number of groups to encode position-sensitive score maps, must be within the range (0, 128).
+ - **output_dim** (Number) - A required int32, specifying the number of output channels, must be greater than 0.
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> roi = torch.tensor([[[1], [2], [3], [4], [5]],
+ [[6], [7], [8], [9], [10]]], dtype = torch.float16).npu()
+ >>> x = torch.tensor([[[[ 1]], [[ 2]], [[ 3]], [[ 4]],
+ [[ 5]], [[ 6]], [[ 7]], [[ 8]]],
+ [[[ 9]], [[10]], [[11]], [[12]],
+ [[13]], [[14]], [[15]], [[16]]]], dtype = torch.float16).npu()
+ >>> out = torch.npu_ps_roi_pooling(x, roi, 0.5, 2, 2)
+ >>> out
+ tensor([[[[0., 0.],
+ [0., 0.]],
+ [[0., 0.],
+ [0., 0.]]],
+ [[[0., 0.],
+ [0., 0.]],
+ [[0., 0.],
+ [0., 0.]]]], device='npu:0', dtype=torch.float16)
+ ```
+
+> npu_roi_align(features, rois, spatial_scale, pooled_height, pooled_width, sample_num, roi_end_mode) -> Tensor
+
+Obtains the ROI feature matrix from the feature map. It is a customized FasterRcnn operator.
+
+- Parameters:
+ - **features** (Tensor) - A Tensor in 5HD.
+ - **rois** (Tensor) - ROI position. A 2D Tensor with shape (N, 5). "N" indicates the number of ROIs, the value "5" indicates the indexes of images where the ROIs are located, "x0", "y0", "x1", and "y1".
+ - **spatial_scale** (Number) - A required attribute of type float32, specifying the scaling ratio of "features" to the original image.
+ - **pooled_height** (Number) - A required attribute of type int32, specifying the H dimension.
+ - **pooled_width** (Number) - A required attribute of type int32, specifying the W dimension.
+ - **sample_num** (Number) - An optional attribute of type int32, specifying the horizontal and vertical sampling frequency of each output. If this attribute is set to "0", the sampling frequency is equal to the rounded up value of "rois", which is a floating point number. Defaults to "2".
+ - **roi_end_mode** (Number) - An optional attribute of type int32. Defaults to "1".
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> x = torch.FloatTensor([[[[1, 2, 3 , 4, 5, 6],
+ [7, 8, 9, 10, 11, 12],
+ [13, 14, 15, 16, 17, 18],
+ [19, 20, 21, 22, 23, 24],
+ [25, 26, 27, 28, 29, 30],
+ [31, 32, 33, 34, 35, 36]]]]).npu()
+ >>> rois = torch.tensor([[0, -2.0, -2.0, 22.0, 22.0]]).npu()
+ >>> out = torch.npu_roi_align(x, rois, 0.25, 3, 3, 2, 0)
+ >>> out
+ tensor([[[[ 4.5000, 6.5000, 8.5000],
+ [16.5000, 18.5000, 20.5000],
+ [28.5000, 30.5000, 32.5000]]]], device='npu:0')
+ ```
+
+> npu_nms_v4(boxes, scores, max_output_size, iou_threshold, scores_threshold, pad_to_max_output_size=False) -> (Tensor, Tensor)
+
+Greedily selects a subset of bounding boxes in descending order of score.
+
+- Parameters:
+ - **boxes** (Tensor) - A 2-D float tensor of shape [num_boxes, 4].
+ - **scores** (Tensor) - A 1-D float tensor of shape [num_boxes] representing a single score corresponding to each box (each row of boxes).
+ - **max_output_size** (Number) - A scalar representing the maximum number of boxes to be selected by non max suppression.
+ - **iou_threshold** (Tensor) - A 0-D float tensor representing the threshold for deciding whether boxes overlap too much with respect to IOU.
+ - **scores_threshold** (Tensor) - A 0-D float tensor representing the threshold for deciding when to remove boxes based on score.
+ - **pad_to_max_output_size** (bool) - If true, the output selected_indices is padded to be of length max_output_size. Defaults to false.
+
+- Returns:
+ - **selected_indices** - A 1-D integer tensor of shape [M] representing the selected indices from the boxes tensor, where M <= max_output_size.
+ - **valid_outputs** - A 0-D integer tensor representing the number of valid elements in selected_indices, with the valid elements appearing first.
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> boxes=torch.randn(100,4).npu()
+ >>> scores=torch.randn(100).npu()
+ >>> boxes.uniform_(0,100)
+ >>> scores.uniform_(0,1)
+ >>> max_output_size = 20
+ >>> iou_threshold = torch.tensor(0.5).npu()
+ >>> scores_threshold = torch.tensor(0.3).npu()
+ >>> npu_output = torch.npu_nms_v4(boxes, scores, max_output_size, iou_threshold, scores_threshold)
+ >>> npu_output
+ (tensor([57, 65, 25, 45, 43, 12, 52, 91, 23, 78, 53, 11, 24, 62, 22, 67, 9, 94,
+ 54, 92], device='npu:0', dtype=torch.int32), tensor(20, device='npu:0', dtype=torch.int32))
+ ```
+
+> npu_nms_rotated(dets, scores, iou_threshold, scores_threshold=0, max_output_size=-1, mode=0) -> (Tensor, Tensor)
+
+Greedy selects a subset of the rotated bounding boxes in descending fractional order.
+
+- Parameters:
+ - **dets** (Tensor) - A 2-D float tensor of shape [num_boxes, 5].
+ - **scores** (Tensor) - A 1-D float tensor of shape [num_boxes] representing a single score corresponding to each box (each row of boxes).
+ - **iou_threshold** (Number) - A scalar representing the threshold for deciding whether boxes overlap too much with respect to IOU.
+ - **scores_threshold** (Number) - A scalar representing the threshold for deciding when to remove boxes based on score. Defaults to "0".
+ - **max_output_size** (Number) - A scalar integer tensor representing the maximum number of boxes to be selected by non max suppression. Defaults to "-1", that is, no constraint is imposed.
+ - **mode** (Number) - This parameter specifies the layout type of the dets. The default value is 0. If mode is set to 0, the input values of dets are x, y, w, h, and angle. If mode is set to 1, the input values of dets are x1, y1, x2, y2, and angle. Defaults to "0".
+
+- Returns:
+ - **selected_index** - A 1-D integer tensor of shape [M] representing the selected indices from the dets tensor, where M <= max_output_size.
+ - **selected_num** - A 0-D integer tensor representing the number of valid elements in selected_indices.
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> dets=torch.randn(100,5).npu()
+ >>> scores=torch.randn(100).npu()
+ >>> dets.uniform_(0,100)
+ >>> scores.uniform_(0,1)
+ >>> output1, output2 = torch.npu_nms_rotated(dets, scores, 0.2, 0, -1, 1)
+ >>> output1
+ tensor([76, 48, 15, 65, 91, 82, 21, 96, 62, 90, 13, 59, 0, 18, 47, 23, 8, 56,
+ 55, 63, 72, 39, 97, 81, 16, 38, 17, 25, 74, 33, 79, 44, 36, 88, 83, 37,
+ 64, 45, 54, 41, 22, 28, 98, 40, 30, 20, 1, 86, 69, 57, 43, 9, 42, 27,
+ 71, 46, 19, 26, 78, 66, 3, 52], device='npu:0', dtype=torch.int32)
+ >>> output2
+ tensor([62], device='npu:0', dtype=torch.int32)
+ ```
+
+> npu_lstm(x, weight, bias, seq_len, h, c, has_biases, num_layers, dropout, train, bidirectional, batch_first, flag_seq, direction)
+
+DynamicRNN calculation.
+
+- Parameters:
+ - **x** (Tensor) - A required 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **weight** (Tensor) - A required 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_ZN_LSTM.
+ - **bias** (Tensor) - A required 1D Tensor. Must be one of the following types: float16, float32. The format must be ND.
+ - **seq_len** (Tensor) - A optional Tensor. Only Support float16 in FRACTAL_NZ and int32 in ND.
+ - **h** (Tensor) - A optional 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **c** (Tensor) - A optional 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **has_biases** (bool) - If the value is true, bias exists.
+ - **num_layers** (Number) - Number of recurrent layers. Only Support single layer currently.
+ - **dropout** (Number) - If non-zero, introduces a Dropout layer on the outputs of each LSTM layer except the last layer, with dropout probability equal to dropout. unsupport currently.
+ - **train** (bool) - An bool identifying is training in the op. Default to true .
+ - **bidirectional** (bool) - If True, becomes a bidirectional LSTM. unsupport currently.
+ - **batch_first** (bool) - If True, then the input and output tensors are provided as (batch, seq, feature). unsupport currently.
+ - **flag_seq** (bool) - If True, then the input is PackSequnce. unsupport currently.
+ - **direction** (bool) - If True, then the direction is "REDIRECTIONAL", otherwise is "UNIDIRECTIONAL".
+
+- Returns:
+ - **y** - A 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **output_h** - A 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **output_c** - A 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **i** - A 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **j** - A 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **f** - A 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **o** - A 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **tanhct** - A 4D Tensor. Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ None
+
+>npu_iou(bboxes, gtboxes, mode=0) -> Tensor
+>npu_ptiou(bboxes, gtboxes, mode=0) -> Tensor
+
+Computes the intersection over union (iou) or the intersection over. foreground (iof) based on the ground-truth and predicted regions.
+
+- Parameters:
+ - **bboxes** (Tensor) - the input tensor.
+ - **gtboxes** (Tensor) - the input tensor.
+ - **mode** (Number) - 0 1 corresponds to two modes iou iof.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> bboxes = torch.tensor([[0, 0, 10, 10],
+ [10, 10, 20, 20],
+ [32, 32, 38, 42]], dtype=torch.float16).to("npu")
+ >>> gtboxes = torch.tensor([[0, 0, 10, 20],
+ [0, 10, 10, 10],
+ [10, 10, 20, 20]], dtype=torch.float16).to("npu")
+ >>> output_iou = torch.npu_iou(bboxes, gtboxes, 0)
+ >>> output_iou
+ tensor([[0.4985, 0.0000, 0.0000],
+ [0.0000, 0.0000, 0.0000],
+ [0.0000, 0.9961, 0.0000]], device='npu:0', dtype=torch.float16)
+ ```
+
+>npu_pad(input, paddings) -> Tensor
+
+Pads a tensor
+
+- Parameters:
+ - **input** (Tensor) - the input tensor.
+ - **paddings** (ListInt) - type int32 or int64.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.tensor([[20, 20, 10, 10]], dtype=torch.float16).to("npu")
+ >>> paddings = [1, 1, 1, 1]
+ >>> output = torch.npu_pad(input, paddings)
+ >>> output
+ tensor([[ 0., 0., 0., 0., 0., 0.],
+ [ 0., 20., 20., 10., 10., 0.],
+ [ 0., 0., 0., 0., 0., 0.]], device='npu:0', dtype=torch.float16)
+ ```
+
+>npu_nms_with_mask(input, iou_threshold) -> (Tensor, Tensor, Tensor)
+
+The value 01 is generated for the nms operator to determine the valid bit
+
+- Parameters:
+ - **input** (Tensor) - the input tensor.
+ - **iou_threshold** (Number) - Threshold. If the value exceeds this threshold, the value is 1. Otherwise, the value is 0.
+
+- Returns:
+
+ - **selected_boxes** - 2-D tensor with shape of [N,5], representing filtered boxes including proposal boxes and corresponding confidence scores.
+ - **selected_idx** - 1-D tensor with shape of [N], representing the index of input proposal boxes.
+ - **selected_mask** - 1-D tensor with shape of [N], the symbol judging whether the output proposal boxes is valid .
+
+- constraints:
+
+ The 2nd-dim of input box_scores must be equal to 8.
+
+- Examples:
+
+ ```python
+ >>> input = torch.tensor([[0.0, 1.0, 2.0, 3.0, 0.6], [6.0, 7.0, 8.0, 9.0, 0.4]], dtype=torch.float16).to("npu")
+ >>> iou_threshold = 0.5
+ >>> output1, output2, output3, = torch.npu_nms_with_mask(input, iou_threshold)
+ >>> output1
+ tensor([[0.0000, 1.0000, 2.0000, 3.0000, 0.6001],
+ [6.0000, 7.0000, 8.0000, 9.0000, 0.3999]], device='npu:0',
+ dtype=torch.float16)
+ >>> output2
+ tensor([0, 1], device='npu:0', dtype=torch.int32)
+ >>> output3
+ tensor([1, 1], device='npu:0', dtype=torch.uint8)
+ ```
+
+>npu_bounding_box_encode(anchor_box, ground_truth_box, means0, means1, means2, means3, stds0, stds1, stds2, stds3) -> Tensor
+
+Computes the coordinate variations between bboxes and ground truth boxes. It is a customized FasterRcnn operator
+
+- Parameters:
+ - **anchor_box** (Tensor) - the input tensor.Anchor boxes. A 2D Tensor of float32 with shape (N, 4). "N" indicates the number of bounding boxes, and the value "4" refers to "x0", "x1", "y0", and "y1".
+ - **ground_truth_box** (Tensor) - the input tensor.Ground truth boxes. A 2D Tensor of float32 with shape (N, 4). "N" indicates the number of bounding boxes, and the value "4" refers to "x0", "x1", "y0", and "y1"
+ - **means0** (Number) - An index of type int
+ - **means1** (Number) - An index of type int
+ - **means2** (Number) - An index of type int
+ - **means3** (Number) - An index of type int. Defaults to [0,0,0,0]. "deltas" = "deltas" x "stds" + "means".
+ - **stds0** (Number) - An index of type int
+ - **stds1** (Number) - An index of type int
+ - **stds2** (Number) - An index of type int
+ - **stds3** (Number) - An index of type int Defaults to [1.0,1.0,1.0,1.0]. "deltas" = "deltas" x "stds" + "means" .
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> anchor_box = torch.tensor([[1., 2., 3., 4.], [3.,4., 5., 6.]], dtype = torch.float32).to("npu")
+ >>> ground_truth_box = torch.tensor([[5., 6., 7., 8.], [7.,8., 9., 6.]], dtype = torch.float32).to("npu")
+ >>> output = torch.npu_bounding_box_encode(anchor_box, ground_truth_box, 0, 0, 0, 0, 0.1, 0.1, 0.2, 0.2)
+ >>> output
+ tensor([[13.3281, 13.3281, 0.0000, 0.0000],
+ [13.3281, 6.6641, 0.0000, -5.4922]], device='npu:0')
+ >>>
+ ```
+
+>npu_bounding_box_decode(rois, deltas, means0, means1, means2, means3, stds0, stds1, stds2, stds3, max_shape, wh_ratio_clip) -> Tensor
+
+Generates bounding boxes based on "rois" and "deltas". It is a customized FasterRcnn operator .
+
+- Parameters:
+ - **rois** (Tensor) - Region of interests (ROIs) generated by the region proposal network (RPN). A 2D Tensor of type float32 or float16 with shape (N, 4). "N" indicates the number of ROIs, and the value "4" refers to "x0", "x1", "y0", and "y1".
+ - **deltas** (Tensor) - Absolute variation between the ROIs generated by the RPN and ground truth boxes. A 2D Tensor of type float32 or float16 with shape (N, 4). "N" indicates the number of errors, and 4 indicates "dx", "dy", "dw", and "dh" .
+ - **means0** (Number) - An index of type int
+ - **means1** (Number) - An index of type int
+ - **means2** (Number) - An index of type int
+ - **means3** (Number) - An index of type int. Defaults to [0,0,0,0]. "deltas" = "deltas" x "stds" + "means".
+ - **stds0** (Number) - An index of type int
+ - **stds1** (Number) - An index of type int
+ - **stds2** (Number) - An index of type int
+ - **stds3** (Number) - An index of type int Defaults to [1.0,1.0,1.0,1.0]. "deltas" = "deltas" x "stds" + "means" .
+ - **max_shape** (ListInt) - Shape [h, w], specifying the size of the image transferred to the network. Used to ensure that the bbox shape after conversion does not exceed "max_shape
+ - **wh_ratio_clip** (Number) - Defaults to "16/1000". The values of "dw" and "dh" fall within (-wh_ratio_clip, wh_ratio_clip) .
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> rois = torch.tensor([[1., 2., 3., 4.], [3.,4., 5., 6.]], dtype = torch.float32).to("npu")
+ >>> deltas = torch.tensor([[5., 6., 7., 8.], [7.,8., 9., 6.]], dtype = torch.float32).to("npu")
+ >>> output = torch.npu_bounding_box_decode(rois, deltas, 0, 0, 0, 0, 1, 1, 1, 1, (10, 10), 0.1)
+ >>> output
+ tensor([[2.5000, 6.5000, 9.0000, 9.0000],
+ [9.0000, 9.0000, 9.0000, 9.0000]], device='npu:0')
+ ```
+
+>npu_gru(input, hx, weight_input, weight_hidden, bias_input, bias_hidden, seq_length, has_biases, num_layers, dropout, train, bidirectional, batch_first) -> (Tensor, Tensor, Tensor, Tensor, Tensor, Tensor)
+
+DynamicGRUV2 calculation.
+
+- Parameters:
+ - **input** (Tensor) - Must be one of the following types: float16. The format must be FRACTAL_NZ.
+ - **hx** (Tensor) - Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **weight_input** (Tensor) - Must be one of the following types: float16. The format must be FRACTAL_Z.
+ - **weight_hidden** (Tensor) - Must be one of the following types: float16. The format must be FRACTAL_Z.
+ - **bias_input** (Tensor) - Must be one of the following types: float16, float32. The format must be ND.
+ - **bias_hidden** (Tensor) - Must be one of the following types: float16, float32. The format must be ND.
+ - **seq_length** (Tensor) - Must be one of the following types: int32. The format must be ND.
+ - **has_biases** (bool) - Default to true.
+ - **num_layers** (Number)
+ - **dropout** (Number)
+ - **train** (bool) - An bool identifying is training in the op. Default to true.
+ - **bidirectional** (bool) - Default to true.
+ - **batch_first** (bool) - Default to true.
+
+- Returns:
+
+ - **y** (Tensor) - Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **output_h** (Tensor) - output_h:Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **update** (Tensor) - update:Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **reset** (Tensor) - reset:Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **new** (Tensor) - Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+ - **hidden_new** (Tensor) - Must be one of the following types: float16, float32. The format must be FRACTAL_NZ.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ None
+
+>npu_random_choice_with_mask(x, count=256, seed=0, seed2=0) -> (Tensor, Tensor)
+
+Shuffle index of no-zero element
+
+- Parameters:
+ - **x** (Tensor) - the input tensor.
+ - **count** (Number) - the count of output, if 0, out all no-zero elements.
+ - **seed** (Number) - type int32 or int64.
+ - **seed2** (Number) - type int32 or int64.
+
+- Returns:
+
+ - **y** - 2-D tensor, no-zero element index.
+ - **mask** - 1-D, whether the corresponding index is valid.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.tensor([1, 0, 1, 0], dtype=torch.bool).to("npu")
+ >>> result, mask = torch.npu_random_choice_with_mask(x, 2, 1, 0)
+ >>> result
+ tensor([[0],
+ [2]], device='npu:0', dtype=torch.int32)
+ >>> mask
+ tensor([True, True], device='npu:0')
+ ```
+
+>npu_batch_nms(self, scores, score_threshold, iou_threshold, max_size_per_class, max_total_size, change_coordinate_frame=False, transpose_box=False) -> (Tensor, Tensor, Tensor, Tensor)
+
+Computes nms for input boxes and score, support multiple batch and classes. will do clip to window, score filter, top_k, and nms
+
+- Parameters:
+ - **self** (Tensor) - the input tensor.
+ - **scores** (Tensor) - the input tensor.
+ - **score_threshold** (Number) - A required attribute of type float32, specifying the score filter iou iou_threshold.
+ - **iou_threshold** (Number) - A required attribute of type float32, specifying the nms iou iou_threshold.
+ - **max_size_per_class** (Number) - A required attribute of type int, specifying the nms output num per class.
+ - **max_total_size** (Number) - A required attribute of type int, specifying the the nms output num per batch.
+ - **change_coordinate_frame** (bool) - A optional attribute of type bool, whether to normalize coordinates after clipping.
+ - **transpose_box** (bool) - A optional attribute of type bool, whether inserted transpose before this op. must be "false"
+
+- Returns:
+
+ - **nmsed_boxes** (Tensor) - A 3D Tensor of type float16 with shape (batch, max_total_size, 4),specifying the output nms boxes per batch.
+ - **nmsed_scores** (Tensor) - A 2D Tensor of type float16 with shape (batch, max_total_size),specifying the output nms score per batch.
+ - **nmsed_classes** (Tensor) - A 2D Tensor of type float16 with shape (batch, max_total_size),specifying the output nms class per batch.
+ - **nmsed_num** (Tensor) - A 1D Tensor of type int32 with shape (batch), specifying the valid num of nmsed_boxes.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> boxes = torch.randn(8, 2, 4, 4, dtype = torch.float32).to("npu")
+ >>> scores = torch.randn(3, 2, 4, dtype = torch.float32).to("npu")
+ >>> nmsed_boxes, nmsed_scores, nmsed_classes, nmsed_num = torch.npu_batch_nms(boxes, scores, 0.3, 0.5, 3, 4)
+ >>> nmsed_boxes
+ >>> nmsed_scores
+ >>> nmsed_classes
+ >>> nmsed_num
+ ```
+
+>npu_slice(self, offsets, size) -> Tensor
+
+Extracts a slice from a tensor
+
+- Parameters:
+ - **self** (Tensor) - the input tensor.
+ - **offsets** (ListInt) - type int32 or int64.
+ - **size** (ListInt) - type int32 or int64.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.tensor([[1,2,3,4,5], [6,7,8,9,10]], dtype=torch.float16).to("npu")
+ >>> offsets = [0, 0]
+ >>> size = [2, 2]
+ >>> output = torch.npu_slice(input, offsets, size)
+ >>> output
+ tensor([[1., 2.],
+ [6., 7.]], device='npu:0', dtype=torch.float16)
+ ```
+
+>npu_dropoutV2(self, seed, p) -> (Tensor, Tensor, Tensor(a!))
+
+count dropout result with seed
+
+- Parameters:
+ - **self** (Tensor) - The input Tensor.
+ - **seed** (Tensor) - The input Tensor.
+ - **p** (Float) - Dropout probability.
+
+- Returns:
+
+ - **y** - A tensor with the same shape and type as "x".
+ - **mask** - A tensor with the same shape and type as "x".
+ - **new_seed** - A tensor with the same shape and type as "seed".
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.tensor([1.,2.,3.,4.]).npu()
+ >>> input
+ tensor([1., 2., 3., 4.], device='npu:0')
+ >>> seed = torch.rand((32,),dtype=torch.float32).npu()
+ >>> seed
+ tensor([0.4368, 0.7351, 0.8459, 0.4657, 0.6783, 0.8914, 0.8995, 0.4401, 0.4408,
+ 0.4453, 0.2404, 0.9680, 0.0999, 0.8665, 0.2993, 0.5787, 0.0251, 0.6783,
+ 0.7411, 0.0670, 0.9430, 0.9165, 0.3983, 0.5849, 0.7722, 0.4659, 0.0486,
+ 0.2693, 0.6451, 0.2734, 0.3176, 0.0176], device='npu:0')
+ >>> prob = 0.3
+ >>> output, mask, out_seed = torch.npu_dropoutV2(input, seed, prob)
+ >>> output
+ tensor([0.4408, 0.4453, 0.2404, 0.9680], device='npu:0')
+ >>> mask
+ tensor([0., 0., 0., 0.], device='npu:0')
+ >>> out_seed
+ tensor([0.4408, 0.4453, 0.2404, 0.9680, 0.0999, 0.8665, 0.2993, 0.5787, 0.0251,
+ 0.6783, 0.7411, 0.0670, 0.9430, 0.9165, 0.3983, 0.5849, 0.7722, 0.4659,
+ 0.0486, 0.2693, 0.6451, 0.2734, 0.3176, 0.0176, 0.0000, 0.0000, 0.0000,
+ 0.0000, 0.0000, 0.0000, 0.0000, 0.0000], device='npu:0')
+ ```
+
+>_npu_dropout(self, p) -> (Tensor, Tensor)
+
+count dropout result without seed
+
+- Parameters:
+ Similar to `torch.dropout`, optimize implemention to npu device.
+ - **self** (Tensor) - The input Tensor.
+ - **p** (Float) - Dropout probability.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.tensor([1.,2.,3.,4.]).npu()
+ >>> input
+ tensor([1., 2., 3., 4.], device='npu:0')
+ >>> prob = 0.3
+ >>> output, mask = torch._npu_dropout(input, prob)
+ >>> output
+ tensor([0.0000, 2.8571, 0.0000, 0.0000], device='npu:0')
+ >>> mask
+ tensor([ 98, 255, 188, 186, 120, 157, 175, 159, 77, 223, 127, 79, 247, 151,
+ 253, 255], device='npu:0', dtype=torch.uint8)
+ ```
+
+>_npu_dropout_inplace(result, p) -> (Tensor(a!), Tensor)
+
+count dropout result inplace.
+
+- Parameters:
+ Similar to `torch.dropout_`, optimize implemention to npu device.
+ - **result** (Tensor) - The Tensor dropout inplace.
+ - **p** (Float) - Dropout probability.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.tensor([1.,2.,3.,4.]).npu()
+ >>> input
+ tensor([1., 2., 3., 4.], device='npu:0')
+ >>> prob = 0.3
+ >>> output, mask = torch._npu_dropout_inplace(input, prob)
+ >>> output
+ tensor([0.0000, 2.8571, 0.0000, 0.0000], device='npu:0')
+ >>> input
+ tensor([0.0000, 2.8571, 4.2857, 5.7143], device='npu:0')
+ >>> mask
+ tensor([ 98, 255, 188, 186, 120, 157, 175, 159, 77, 223, 127, 79, 247, 151,
+ 253, 255], device='npu:0', dtype=torch.uint8)
+ ```
+
+>npu_indexing(self, begin, end, strides, begin_mask=0, end_mask=0, ellipsis_mask=0, new_axis_mask=0, shrink_axis_mask=0) -> Tensor
+
+count indexing result by begin,end,strides array.
+
+- Parameters:
+ - **self** (Tensor) - A Input Tensor.
+ - **begin** (ListInt) - The index of the first value to select.
+ - **end** (ListInt) - The index of the last value to select.
+ - **strides** (ListInt) - The index increment.
+ - **begin_mask** (Number) - A bitmask where a bit "i" being "1" means to ignore the begin
+ value and instead use the largest interval possible.
+ - **end_mask** (Number) - Analogous to "begin_mask".
+ - **ellipsis_mask** (Number) - A bitmask where bit "i" being "1" means the "i"th position
+ is actually an ellipsis.
+ - **new_axis_mask** (Number) - A bitmask where bit "i" being "1" means the "i"th
+ specification creates a new shape 1 dimension.
+ - **shrink_axis_mask** (Number) - A bitmask where bit "i" implies that the "i"th
+ specification should shrink the dimensionality.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.tensor([[1, 2, 3, 4],[5, 6, 7, 8]], dtype=torch.int32).to("npu")
+ >>> input
+ tensor([[1, 2, 3, 4],
+ [5, 6, 7, 8]], device='npu:0', dtype=torch.int32)
+ >>> output = torch.npu_indexing(input1, [0, 0], [2, 2], [1, 1])
+ >>> output
+ tensor([[1, 2],
+ [5, 6]], device='npu:0', dtype=torch.int32)
+ ```
+
+>npu_ifmr(Tensor data, Tensor data_min, Tensor data_max, Tensor cumsum, float min_percentile, float max_percentile, float search_start, float search_end, float search_step, bool with_offset) -> (Tensor, Tensor)
+
+count ifmr result by begin,end,strides array, Input Feature Map Reconstruction
+
+- Parameters:
+ - **data** (Tensor) - A Tensor of feature map.
+ - **data_min** (Tensor) - A Tensor of min value of feature map.
+ - **data_max** (Tensor) - A Tensor of max value of feature map.
+ - **cumsum** (Tensor) - A Tensor of cumsum bin of data.
+ - **min_percentile** (Float) - min init percentile.
+ - **max_percentile** (Float) - max init percentile.
+ - **search_start** (Float) - search start.
+ - **search_end** (Float) - search end.
+ - **search_step** (Float) - step size of searching.
+ - **with_offset** (bool) - whether using offset.
+
+- Returns:
+
+ - **scale** - optimal scale.
+ - **offset** - optimal offset .
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.rand((2,2,3,4),dtype=torch.float32).npu()
+ >>> input
+ tensor([[[[0.4508, 0.6513, 0.4734, 0.1924],
+ [0.0402, 0.5502, 0.0694, 0.9032],
+ [0.4844, 0.5361, 0.9369, 0.7874]],
+
+ [[0.5157, 0.1863, 0.4574, 0.8033],
+ [0.5986, 0.8090, 0.7605, 0.8252],
+ [0.4264, 0.8952, 0.2279, 0.9746]]],
+
+ [[[0.0803, 0.7114, 0.8773, 0.2341],
+ [0.6497, 0.0423, 0.8407, 0.9515],
+ [0.1821, 0.5931, 0.7160, 0.4968]],
+
+ [[0.7977, 0.0899, 0.9572, 0.0146],
+ [0.2804, 0.8569, 0.2292, 0.1118],
+ [0.5747, 0.4064, 0.8370, 0.1611]]]], device='npu:0')
+ >>> min_value = torch.min(input)
+ >>> min_value
+ tensor(0.0146, device='npu:0')
+ >>> max_value = torch.max(input)
+ >>> max_value
+ tensor(0.9746, device='npu:0')
+ >>> hist = torch.histc(input.to('cpu'),
+ bins=128,
+ min=min_value.to('cpu'),
+ max=max_value.to('cpu'))
+ >>> hist
+ tensor([1., 0., 0., 2., 0., 0., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 0., 0.,
+ 0., 1., 0., 0., 2., 1., 0., 0., 0., 0., 2., 1., 0., 0., 0., 0., 0., 1.,
+ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.,
+ 1., 0., 0., 0., 1., 1., 0., 1., 1., 0., 1., 0., 1., 0., 0., 1., 0., 1.,
+ 0., 0., 1., 0., 0., 2., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0., 0.,
+ 0., 0., 1., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 2., 0., 0.,
+ 1., 1., 1., 0., 1., 0., 0., 1., 0., 1., 1., 0., 0., 0., 1., 0., 1., 1.,
+ 0., 1.])
+ >>> cdf = torch.cumsum(hist,dim=0).int().npu()
+ >>> cdf
+ tensor([ 1, 1, 1, 3, 3, 3, 3, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7,
+ 7, 8, 8, 8, 10, 11, 11, 11, 11, 11, 13, 14, 14, 14, 14, 14, 14, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16,
+ 17, 17, 17, 17, 18, 19, 19, 20, 21, 21, 22, 22, 23, 23, 23, 24, 24, 25,
+ 25, 25, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 30, 30, 30, 30, 30, 30,
+ 30, 30, 31, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 34, 35, 37, 37, 37,
+ 38, 39, 40, 40, 41, 41, 41, 42, 42, 43, 44, 44, 44, 44, 45, 45, 46, 47,
+ 47, 48], device='npu:0', dtype=torch.int32)
+ >>> scale, offset = torch.npu_ifmr(input,
+ min_value,
+ max_value,
+ cdf,
+ min_percentile=0.999999,
+ max_percentile=0.999999,
+ search_start=0.7,
+ search_end=1.3,
+ search_step=0.01,
+ with_offset=False)
+ >>> scale
+ tensor(0.0080, device='npu:0')
+ >>> offset
+ tensor(0., device='npu:0')
+ ```
+
+>npu_max.dim(self, dim, keepdim=False) -> (Tensor, Tensor)
+
+count max result with dim.
+
+- Parameters:
+ Similar to `torch.max`, optimize implemention to npu device.
+
+ - **self** (Tensor) – the input tensor.
+ - **dim** (Number) – the dimension to reduce.
+ - **keepdim** (bool) – whether the output tensor has dim retained or not.
+
+- Returns:
+
+ - **values** - max values in the input tensor.
+ - **indices** - index of max values in the input tensor.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.randn(2, 2, 2, 2, dtype = torch.float32).npu()
+ >>> input
+ tensor([[[[-1.8135, 0.2078],
+ [-0.6678, 0.7846]],
+
+ [[ 0.6458, -0.0923],
+ [-0.2124, -1.9112]]],
+
+ [[[-0.5800, -0.4979],
+ [ 0.2580, 1.1335]],
+
+ [[ 0.6669, 0.1876],
+ [ 0.1160, -0.1061]]]], device='npu:0')
+ >>> outputs, indices = torch.npu_max(input, 2)
+ >>> outputs
+ tensor([[[-0.6678, 0.7846],
+ [ 0.6458, -0.0923]],
+
+ [[ 0.2580, 1.1335],
+ [ 0.6669, 0.1876]]], device='npu:0')
+ >>> indices
+ tensor([[[1, 1],
+ [0, 0]],
+
+ [[1, 1],
+ [0, 0]]], device='npu:0', dtype=torch.int32)
+ ```
+
+>npu_min.dim(self, dim, keepdim=False) -> (Tensor, Tensor)
+
+count min result with dim.
+
+- Parameters:
+ Similar to `torch.min`, optimize implemention to npu device.
+ - **self** (Tensor) – the input tensor.
+ - **dim** (Number) – the dimension to reduce.
+ - **keepdim** (bool) – whether the output tensor has dim retained or not.
+
+- Returns:
+
+ - **values** - min values in the input tensor.
+ - **indices** - index of min values in the input tensor.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.randn(2, 2, 2, 2, dtype = torch.float32).npu()
+ >>> input
+ tensor([[[[-0.9909, -0.2369],
+ [-0.9569, -0.6223]],
+
+ [[ 0.1157, -0.3147],
+ [-0.7761, 0.1344]]],
+
+ [[[ 1.6292, 0.5953],
+ [ 0.6940, -0.6367]],
+
+ [[-1.2335, 0.2131],
+ [ 1.0748, -0.7046]]]], device='npu:0')
+ >>> outputs, indices = torch.npu_min(input, 2)
+ >>> outputs
+ tensor([[[-0.9909, -0.6223],
+ [-0.7761, -0.3147]],
+
+ [[ 0.6940, -0.6367],
+ [-1.2335, -0.7046]]], device='npu:0')
+ >>> indices
+ tensor([[[0, 1],
+ [1, 0]],
+
+ [[1, 1],
+ [0, 1]]], device='npu:0', dtype=torch.int32)
+ ```
+
+>npu_scatter(self, indices, updates, dim) -> Tensor
+
+count scatter result with dim.
+
+- Parameters:
+ Similar to `torch.scatter`, optimize implemention to npu device.
+
+ - **self** (Tensor) - the input tensor.
+ - **indices** (Tensor) – the indices of elements to scatter, can be either empty or of the same dimensionality as src. When empty, the operation returns self unchanged.
+ - **updates** (Tensor) – the source element(s) to scatter.
+- **dim** (Number) – the axis along which to index
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.tensor([[1.6279, 0.1226], [0.9041, 1.0980]]).npu()
+ >>> input
+ tensor([[1.6279, 0.1226],
+ [0.9041, 1.0980]], device='npu:0')
+ >>> indices = torch.tensor([0, 1],dtype=torch.int32).npu()
+ >>> indices
+ tensor([0, 1], device='npu:0', dtype=torch.int32)
+ >>> updates = torch.tensor([-1.1993, -1.5247]).npu()
+ >>> updates
+ tensor([-1.1993, -1.5247], device='npu:0')
+ >>> dim = 0
+ >>> output = torch.npu_scatter(input, indices, updates, dim)
+ >>> output
+ tensor([[-1.1993, 0.1226],
+ [ 0.9041, -1.5247]], device='npu:0')
+ ```
+
+>npu_layer_norm_eval(input, normalized_shape, weight=None, bias=None, eps=1e-05) -> Tensor
+
+count layer norm result.
+
+- Parameters:
+ The same as `torch.nn.functional.layer_norm`, optimize implemention to npu device.
+ - **input** (Tensor) - The input Tensor.
+ - **normalized_shape** (ListInt) – input shape from an expected input of size.
+ - **weight** (Tensor) - The gamma Tensor.
+ - **bias** (Tensor) - The beta Tensor.
+ - **eps** (Float) – The epsilon value added to the denominator for numerical stability. Default: 1e-5.
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.rand((6, 4), dtype=torch.float32).npu()
+ >>> input
+ tensor([[0.1863, 0.3755, 0.1115, 0.7308],
+ [0.6004, 0.6832, 0.8951, 0.2087],
+ [0.8548, 0.0176, 0.8498, 0.3703],
+ [0.5609, 0.0114, 0.5021, 0.1242],
+ [0.3966, 0.3022, 0.2323, 0.3914],
+ [0.1554, 0.0149, 0.1718, 0.4972]], device='npu:0')
+ >>> normalized_shape = input.size()[1:]
+ >>> normalized_shape
+ torch.Size([4])
+ >>> weight = torch.Tensor(*normalized_shape).npu()
+ >>> weight
+ tensor([ nan, 6.1223e-41, -8.3159e-20, 9.1834e-41], device='npu:0')
+ >>> bias = torch.Tensor(*normalized_shape).npu()
+ >>> bias
+ tensor([5.6033e-39, 6.1224e-41, 6.1757e-39, 6.1224e-41], device='npu:0')
+ >>> output = torch.npu_layer_norm_eval(input, normalized_shape, weight, bias, 1e-5)
+ >>> output
+ tensor([[ nan, 6.7474e-41, 8.3182e-20, 2.0687e-40],
+ [ nan, 8.2494e-41, -9.9784e-20, -8.2186e-41],
+ [ nan, -2.6695e-41, -7.7173e-20, 2.1353e-41],
+ [ nan, -1.3497e-41, -7.1281e-20, -6.9827e-42],
+ [ nan, 3.5663e-41, 1.2002e-19, 1.4314e-40],
+ [ nan, -6.2792e-42, 1.7902e-20, 2.1050e-40]], device='npu:0')
+ ```
+
+>npu_alloc_float_status(self) -> Tensor
+
+Produces eight numbers with a value of zero
+
+- Parameters:
+
+ - **self** (Tensor) - Any Tensor
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> input = torch.randn([1,2,3]).npu()
+ >>> output = torch.npu_alloc_float_status(input)
+ >>> input
+ tensor([[[ 2.2324, 0.2478, -0.1056],
+ [ 1.1273, -0.2573, 1.0558]]], device='npu:0')
+ >>> output
+ tensor([0., 0., 0., 0., 0., 0., 0., 0.], device='npu:0')
+ ```
+
+> npu_get_float_status(self) -> Tensor
+
+Computes NPU get float status operator function.
+
+- Parameters:
+
+ - **self** (Tensor) - A Tensor of data memory address. Must be float32 .
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(2).npu()
+ >>> torch.npu_get_float_status(x)
+ tensor([0., 0., 0., 0., 0., 0., 0., 0.], device='npu:0')
+ ```
+
+> npu_clear_float_status(self) -> Tensor
+
+Set the value of address 0x40000 to 0 in each core.
+
+- Parameters:
+
+ - **self** (Tensor) - A tensor of type float32.
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(2).npu()
+ >>> torch.npu_clear_float_status(x)
+ tensor([0., 0., 0., 0., 0., 0., 0., 0.], device='npu:0')
+ ```
+
+> npu_confusion_transpose(self, perm, shape, transpose_first) -> Tensor
+
+Confuse reshape and transpose.
+
+- Parameters:
+
+ - **self** (Tensor) - A Tensor. Must be one of the following types: float16, float32, int8, int16, int32, int64, uint8, uint16, uint32, uint64.
+ - **perm** (ListInt) - A permutation of the dimensions of "x".
+ - **shape** (ListInt) - The shape of the input.
+ - **transpose_first** (bool) - If True, the transpose is first, otherwise the reshape is first.
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(2, 3, 4, 6).npu()
+ >>> x.shape
+ torch.Size([2, 3, 4, 6])
+ >>> y = torch.npu_confusion_transpose(x, (0, 2, 1, 3), (2, 4, 18), True)
+ >>> y.shape
+ torch.Size([2, 4, 18])
+ >>> y2 = torch.npu_confusion_transpose(x, (0, 2, 1), (2, 12, 6), False)
+ >>> y2.shape
+ torch.Size([2, 6, 12])
+ ```
+
+> npu_bmmV2(self, mat2, output_sizes) -> Tensor
+
+Multiplies matrix "a" by matrix "b", producing "a * b" .
+
+- Parameters:
+ - **self** (Tensor) - A matrix Tensor. Must be one of the following types: float16, float32, int32. 2D or higher. Has format [ND, NHWC, FRACTAL_NZ].
+ - **mat2** (Tensor) - A matrix Tensor. Must be one of the following types: float16, float32, int32. 2D or higher. Has format [ND, NHWC, FRACTAL_NZ].
+ - **output_sizes** (ListInt) - Output's shape, used in matmul's backpropagation, default [].
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> mat1 = torch.randn(10, 3, 4).npu()
+ >>> mat2 = torch.randn(10, 4, 5).npu()
+ >>> res = torch.npu_bmmV2(mat1, mat2, [])
+ >>> res.shape
+ torch.Size([10, 3, 5])
+ ```
+
+> fast_gelu(self) -> Tensor
+
+Computes the gradient for the fast_gelu of "x" .
+
+- Parameters:
+
+ - **self** (Tensor) - A Tensor. Must be one of the following types: float16, float32
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(2).npu()
+ >>> x
+ tensor([0.5991, 0.4094], device='npu:0')
+ >>> torch.fast_gelu(x)
+ tensor([0.4403, 0.2733], device='npu:0')
+ ```
+
+> npu_sub_sample(self, per_images, positive_fraction) -> Tensor
+
+Randomly sample a subset of positive and negative examples,and overwrite the label vector to the ignore value (-1) for all elements that are not included in the sample.
+
+- Parameters:
+
+ - **self** (Tensor) - shape of labels,(N, ) label vector with values.
+ - **per_images** (Number) - A require attribute of type int.
+ - **positive_fraction** (Float) - A require attribute of type float.
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.tensor([-2, 3, 6, -7, -2, 8, 1, -5, 7, 4]).int().npu()
+ >>> x
+ tensor([-2, 3, 6, -7, -2, 8, 1, -5, 7, 4], device='npu:0',
+ dtype=torch.int32)
+ >>> torch.npu_sub_sample(x, 5, 0.6)
+ tensor([-1, -1, -1, -1, -1, -1, 1, -1, -1, -1], device='npu:0',
+ dtype=torch.int32)
+ ```
+
+> npu_deformable_conv2d(input, weight, offset, bias, kernel_size, stride, padding, dilation=[1,1,1,1], groups=1, deformable_groups=1, modulated=True) -> (Tensor, Tensor)
+
+Computes the deformed convolution output with the expected input.
+
+- Parameters:
+
+ - **self** (Tensor) - A 4D tensor of input image. With the format "NHWC", the data is stored in the order of: [batch, in_height, in_width, in_channels].
+ - **weight** (Tensor) - A 4D tensor of learnable filters. Must have the same type as "x". With the format "HWCN" , the data is stored in the order of: [filter_height, filter_width, in_channels / groups, out_channels].
+ - **offset** (Tensor) - A 4D tensor of x-y coordinates offset and mask. With the format "NHWC", the data is stored in the order of: [batch, out_height, out_width, deformable_groups * filter_height * filter_width * 3].
+ - **bias** (Tensor) - An optional 1D tensor of additive biases to the filter outputs. The data is stored in the order of: [out_channels].
+ - **kernel_size** (ListInt) - A tuple/list of 2 integers.kernel size.
+ - **stride** (ListInt) - Required. A list of 4 integers. The stride of the sliding window for each dimension of input. The dimension order is interpreted according to the data format of "x". The N and C dimensions must be set to 1.
+ - **padding** (ListInt) - Required. A list of 4 integers. The number of pixels to add to each (top, bottom, left, right) side of the input.
+ - **dilations** (ListInt) - Optional. A list of 4 integers. The dilation factor for each dimension of input. The dimension order is interpreted according to the data format of "x". The N and C dimensions must be set to 1. Defaults to [1, 1, 1, 1].
+ - **groups** (Number) - Optional. An integer of type int32. The number of blocked connections from input channels to output channels. In_channels and out_channels must both be divisible by "groups". Defaults to 1.
+ - **deformable_groups** (Number) - Optional. An integer of type int32. The number of deformable group partitions. In_channels must be divisible by "deformable_groups". Defaults to 1.
+ - **modulated** (bool) - Optional. Specify version of DeformableConv2D, true means v2, false means v1, currently only support v2.
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(16, 32, 32, 32).npu()
+ >>> weight = torch.rand(32, 32, 5, 5).npu()
+ >>> offset = torch.rand(16, 75, 32, 32).npu()
+ >>> output, _ = torch.npu_deformable_conv2d(x, weight, offset, None, kernel_size=[5, 5], stride = [1, 1, 1, 1], padding = [2, 2, 2, 2])
+ >>> output.shape
+ torch.Size([16, 32, 32, 32])
+ ```
+
+> npu_mish(self) -> Tensor
+
+Computes hyperbolic tangent of "x" element-wise.
+
+- Parameters:
+
+ - **self** (Tensor) - A Tensor. Must be one of the following types: float16, float32.
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(10, 30, 10).npu()
+ >>> y = torch.npu_mish(x)
+ >>> y.shape
+ torch.Size([10, 30, 10])
+ ```
+
+> npu_anchor_response_flags(self, featmap_size, stride, num_base_anchors) -> Tensor
+
+Generate the responsible flags of anchor in a single feature map.
+
+- Parameters:
+ - **self** (Tensor) - Ground truth box, 2-D Tensor with shape [batch, 4].
+ - **featmap_size** (ListInt) - The size of feature maps, listint.
+ - **strides** (ListInt) - Stride of current level, listint.
+ - **num_base_anchors** (Number) - The number of base anchors.
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> x = torch.rand(100, 4).npu()
+ >>> y = torch.npu_anchor_response_flags(x, [60, 60], [2, 2], 9)
+ >>> y.shape
+ torch.Size([32400])
+ ```
+
+> npu_yolo_boxes_encode(self, gt_bboxes, stride, performance_mode=False) -> Tensor
+
+Generates bounding boxes based on yolo's "anchor" and "ground-truth" boxes. It is a customized mmdetection operator.
+
+- Parameters:
+ - **self** (Tensor) - anchor boxes generated by the yolo training set. A 2D Tensor of type float32 or float16 with shape (N, 4). "N" indicates the number of ROIs, "N" indicates the number of ROIs, and the value "4" refers to (tx, ty, tw, th).
+ - **gt_bboxes** (Tensor) - target of the transformation, e.g, ground-truth boxes. A 2D Tensor of type float32 or float16 with shape (N, 4). "N" indicates the number of ROIs, and 4 indicates "dx", "dy", "dw", and "dh".
+ - **strides** (Tensor) - Scale for each box. A 1D Tensor of type int32 shape (N,). "N" indicates the number of ROIs.
+- **performance_mode** (bool) - Select performance mode, "high_precision" or "high_performance". select "high_precision" when input type is float32, the output tensor precision will be smaller than 0.0001, select "high_performance" when input type is float32, the ops will be best performance, but precision will be only smaller than 0.005.
+
+- Constraints:
+
+ input anchor boxes only support maximum N=20480.
+
+- Examples:
+
+ ```python
+ >>> anchor_boxes = torch.rand(2, 4).npu()
+ >>> gt_bboxes = torch.rand(2, 4).npu()
+ >>> stride = torch.tensor([2, 2], dtype=torch.int32).npu()
+ >>> output = torch.npu_yolo_boxes_encode(anchor_boxes, gt_bboxes, stride, False)
+ >>> output.shape
+ torch.Size([2, 4])
+ ```
+
+> npu_grid_assign_positive(self, overlaps, box_responsible_flags, max_overlaps, argmax_overlaps, gt_max_overlaps, gt_argmax_overlaps, num_gts, pos_iou_thr, min_pos_iou, gt_max_assign_all) -> Tensor
+
+Performs Position Sensitive PS ROI Pooling Grad.
+
+- Parameters:
+ - **self** (Tensor) - Tensor of type float16 or float32, shape (n, )
+ - **overlaps** (Tensor) - A Tensor. Datatype is same as assigned_gt_inds. IOU between gt_bboxes and bboxes. shape(k, n)
+ - **box_responsible_flags** (Tensor) - A Tensor. Support uint8. Flag to indicate whether box is responsible.
+ - **max_overlaps** (Tensor) - A Tensor. Datatype is same as assigned_gt_inds. overlaps.max(axis=0).
+ - **argmax_overlaps** (Tensor) - A Tensor. Support int32. overlaps.argmax(axis=0).
+ - **gt_max_overlaps** (Tensor) - A Tensor. Datatype is same as assigned_gt_inds. overlaps.max(axis=1).
+ - **gt_argmax_overlaps** (Tensor) - A Tensor. Support int32. overlaps.argmax(axis=1).
+ - **num_gts** (Number) - A Tensor. Support int32. real k. shape (1, )
+ - **pos_iou_thr** (Float) - loat. IOU threshold for positive bboxes.
+ - **min_pos_iou** (Float) - float. minimum iou for a bbox to be considered as a positive bbox
+ - **gt_max_assign_all** (bool) - bool. whether to assign all bboxes with the same highest overlap with some gt to that gt.
+
+- Constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> assigned_gt_inds = torch.rand(4).npu()
+ >>> overlaps = torch.rand(2,4).npu()
+ >>> box_responsible_flags = torch.tensor([1, 1, 1, 0], dtype=torch.uint8).npu()
+ >>> max_overlap = torch.rand(4).npu()
+ >>> argmax_overlap = torch.tensor([1, 0, 1, 0], dtype=torch.int32).npu()
+ >>> gt_max_overlaps = torch.rand(2).npu()
+ >>> gt_argmax_overlaps = torch.tensor([1, 0],dtype=torch.int32).npu()
+ >>> output = torch.npu_grid_assign_positive(assigned_gt_inds, overlaps, box_responsible_flags, max_overlap, argmax_overlap, gt_max_overlaps, gt_argmax_overlaps, 128, 0.5, 0., True)
+ >>> output.shape
+ torch.Size([4])
+ ```
+
+> npu_normalize_batch(self, seq_len, normalize_type=0) -> Tensor
+
+ Performs batch normalization .
+
+- Parameters:
+
+ - **self** (Tensor) - A Tensor. Support float32. shape (n, c, d).
+ - **seq_len** (Tensor) - A Tensor. Each batch normalize data num. Support Int32. Shape (n, ).
+ - **normalize_type** (Number) - Str. Support "per_feature" or "all_features".
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> a=np.random.uniform(1,10,(2,3,6)).astype(np.float32)
+ >>> b=np.random.uniform(3,6,(2)).astype(np.int32)
+ >>> x=torch.from_numpy(a).to("npu")
+ >>> seqlen=torch.from_numpy(b).to("npu")
+ >>> out = torch.npu_normalize_batch(x, seqlen, 0)
+ >>> out
+ tensor([[[ 1.1496, -0.6685, -0.4812, 1.7611, -0.5187, 0.7571],
+ [ 1.1445, -0.4393, -0.7051, 1.0474, -0.2646, -0.1582],
+ [ 0.1477, 0.9179, -1.0656, -6.8692, -6.7437, 2.8621]],
+
+ [[-0.6880, 0.1337, 1.3623, -0.8081, -1.2291, -0.9410],
+ [ 0.3070, 0.5489, -1.4858, 0.6300, 0.6428, 0.0433],
+ [-0.5387, 0.8204, -1.1401, 0.8584, -0.3686, 0.8444]]],
+ device='npu:0')
+ ```
+
+> npu_masked_fill_range(self, start, end, value, axis=-1) -> Tensor
+
+masked fill tensor along with one axis by range.boxes. It is a customized masked fill range operator .
+
+- Parameters:
+
+ - **self** (Tensor) - input tensor. A ND Tensor of float32/float16/int32/int8 with shapes 1-D (D,), 2-D(N, D), 3-D(N, C, D).
+ - **start** (Tensor) - masked fill start pos. A 3D Tensor of int32 with shape (num, N).
+ - **end** (Tensor) - masked fill end pos. A 3D Tensor of int32 with shape (num, N).
+ - **value** (Tensor) - masked fill value. A 2D Tensor of float32/float16/int32/int8 with shape (num,).
+ - **axis** (Number) - axis with masked fill of int32. Defaults to -1.
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> a=torch.rand(4,4).npu()
+ >>> a
+ tensor([[0.9419, 0.4919, 0.2874, 0.6560],
+ [0.6691, 0.6668, 0.0330, 0.1006],
+ [0.3888, 0.7011, 0.7141, 0.7878],
+ [0.0366, 0.9738, 0.4689, 0.0979]], device='npu:0')
+ >>> start = torch.tensor([[0,1,2]], dtype=torch.int32).npu()
+ >>> end = torch.tensor([[1,2,3]], dtype=torch.int32).npu()
+ >>> value = torch.tensor([1], dtype=torch.float).npu()
+ >>> out = torch.npu_masked_fill_range(a, start, end, value, 1)
+ >>> out
+ tensor([[1.0000, 0.4919, 0.2874, 0.6560],
+ [0.6691, 1.0000, 0.0330, 0.1006],
+ [0.3888, 0.7011, 1.0000, 0.7878],
+ [0.0366, 0.9738, 0.4689, 0.0979]], device='npu:0')
+ ```
+
+> npu_linear(input, weight, bias=None) -> Tensor
+
+ Multiplies matrix "a" by matrix "b", producing "a * b" .
+
+- Parameters:
+
+ - **input** (Tensor) - A matrix Tensor. 2D. Must be one of the following types: float32, float16, int32, int8. Has format [ND, NHWC, FRACTAL_NZ].
+ - **weight** (Tensor) - A matrix Tensor. 2D. Must be one of the following types: float32, float16, int32, int8. Has format [ND, NHWC, FRACTAL_NZ].
+ - **bias** (Tensor) - A 1D Tensor. Must be one of the following types: float32, float16, int32. Has format [ND, NHWC].
- constraints:
None
- Examples:
+ ```python
+ >>> x=torch.rand(2,16).npu()
+ >>> w=torch.rand(4,16).npu()
+ >>> b=torch.rand(4).npu()
+ >>> output = torch.npu_linear(x, w, b)
+ >>> output
+ tensor([[3.6335, 4.3713, 2.4440, 2.0081],
+ [5.3273, 6.3089, 3.9601, 3.2410]], device='npu:0')
+ ```
+
+> npu_bert_apply_adam.old(Tensor(a!) var, Tensor(b!) m, Tensor(c!) v, lr, beta1, beta2, epsilon, grad, max_grad_norm, global_grad_norm, weight_decay, step_size=None, adam_mode=0) -> (Tensor(a!), Tensor(b!), Tensor(c!))
+
+ count adam result.
+
+- Parameters:
+
+ - **var** (Tensor) - A Tensor. Support float16/float32.
+ - **m**(Tensor) - A Tensor. Datatype and shape are same as exp_avg.
+ - **v**(Tensor) - A Tensor. Datatype and shape are same as exp_avg.
+ - **lr** (Number) - A Tensor. Datatype is same as exp_avg.
+ - **beta1** (Number) - A Tensor. Datatype is same as exp_avg.
+ - **beta2** (Number) - A Tensor. Datatype is same as exp_avg.
+ - **epsilon** (Number) - A Tensor. Datatype is same as exp_avg.
+ - **grad**(Tensor) - A Tensor. Datatype and shape are same as exp_avg.
+ - **max_grad_norm** (Number) - A Tensor. Datatype is same as exp_avg.
+ - **global_grad_norm** (Number) - A Tensor. Datatype is same as exp_avg.
+ - **weight_decay** (Number) - A Tensor. Datatype is same as exp_avg.
+
+- constraints:
+ None
+
+- Examples:
```python
- >>> var_in = torch.rand(321538).uniform_(-32.,21.).npu()
- >>> var_in
- tensor([ 0.6119, 5.8193, 3.0683, ..., -28.5832, 12.9402, -24.0488],
- device='npu:0')
+ >>> var_in = torch.rand(321538).uniform_(-32., 21.).npu()
>>> m_in = torch.zeros(321538).npu()
- >>> v_in = torchzeros(321538).npu()
- >>> grad = torch.rand(321538).uniform_(-0.05,0.03).npu()
- >>> grad
- tensor([-0.0315, -0.0113, -0.0132, ..., 0.0106, -0.0226, -0.0252],
- device='npu:0')
+ >>> v_in = torch.zeros(321538).npu()
+ >>> grad = torch.rand(321538).uniform_(-0.05, 0.03).npu()
>>> max_grad_norm = -1.
>>> beta1 = 0.9
>>> beta2 = 0.99
>>> weight_decay = 0.
- >>> lr = 0.1
+ >>> lr = 0.
>>> epsilon = 1e-06
>>> global_grad_norm = 0.
>>> var_out, m_out, v_out = torch.npu_bert_apply_adam(var_in, m_in, v_in, lr, beta1, beta2, epsilon, grad, max_grad_norm, global_grad_norm, weight_decay)
>>> var_out
- tensor([ 0.7118, 5.9192, 3.1682, ..., -28.6831, 13.0402, -23.9489],
- device='npu:0')
- >>> m_out
- tensor([-0.0032, -0.0011, -0.0013, ..., 0.0011, -0.0023, -0.0025],
- device='npu:0')
- >>> v_out
- tensor([9.9431e-06, 1.2659e-06, 1.7328e-06, ..., 1.1206e-06, 5.0933e-06,
- 6.3495e-06], device='npu:0')
+ tensor([ 14.7733, -30.1218, -1.3647, ..., -16.6840, 7.1518, 8.4872],
+ device='npu:0')
+ ```
+
+> npu_bert_apply_adam(lr, beta1, beta2, epsilon, grad, max_grad_norm, global_grad_norm, weight_decay, step_size=None, adam_mode=0, *, out=(var,m,v))
+
+ count adam result.
+
+- Parameters:
+
+ - **var** (Tensor) - A Tensor. Support float16/float32.
+ - **m** (Tensor) - A Tensor. Datatype and shape are same as exp_avg.
+ - **v** (Tensor) - A Tensor. Datatype and shape are same as exp_avg.
+ - **lr** (Number) - Datatype is same as exp_avg.
+ - **beta1** (Number) - Datatype is same as exp_avg.
+ - **beta2** (Number) - Datatype is same as exp_avg.
+ - **epsilon** (Number) - Datatype is same as exp_avg.
+ - **grad** (Tensor) - A Tensor. Datatype and shape are same as exp_avg.
+ - **max_grad_norm** (Number) - Datatype is same as exp_avg.
+ - **global_grad_norm** (Number) - Datatype is same as exp_avg.
+ - **weight_decay** (Number) - Datatype is same as exp_avg.
+
+- Keyword Arguments :
+
+ - **out** :A Tensor, optional. The output tensor.
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> var_in = torch.rand(321538).uniform_(-32., 21.).npu()
+ >>> m_in = torch.zeros(321538).npu()
+ >>> v_in = torch.zeros(321538).npu()
+ >>> grad = torch.rand(321538).uniform_(-0.05, 0.03).npu()
+ >>> max_grad_norm = -1.
+ >>> beta1 = 0.9
+ >>> beta2 = 0.99
+ >>> weight_decay = 0.
+ >>> lr = 0.
+ >>> epsilon = 1e-06
+ >>> global_grad_norm = 0.
+ >>> var_out, m_out, v_out = torch.npu_bert_apply_adam(lr, beta1, beta2, epsilon, grad, max_grad_norm, global_grad_norm, weight_decay, out=(var_in, m_in, v_in))
+ >>> var_out
+ tensor([ 14.7733, -30.1218, -1.3647, ..., -16.6840, 7.1518, 8.4872],
+ device='npu:0')
+ ```
+
+> npu_giou(self, gtboxes, trans=False, is_cross=False, mode=0) -> Tensor
+
+First calculate the minimum closure area of the two boxes, IoU, the proportion of the closed area that does not belong to the two boxes in the closure area, and finally subtract this proportion from IoU to get GIoU .
+
+- Parameters:
+
+ - **self** (Tensor) - Bounding boxes, a 2D Tensor of type float16 or float32 with shape (N, 4). "N" indicates the number of bounding boxes, and the value "4" refers to [x1, y1, x2, y2] or [x, y, w, h].
+ - **gtboxes** (Tensor) - Ground-truth boxes, a 2D Tensor of type float16 or float32 with shape (M, 4). "M" indicates the number of ground truth boxes, and the value "4" refers to [x1, y1, x2, y2] or [x, y, w, h].
+ - **trans** (bool) - An optional bool, true for 'xywh', false for 'xyxy'.
+ - **is_cross** (bool) - An optional bool, control whether the output shape is [M, N] or [1, N].
+ - **mode:** (Number) - Computation mode, a character string with the value range of [iou, iof] .
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> a=np.random.uniform(0,1,(4,10)).astype(np.float16)
+ >>> b=np.random.uniform(0,1,(4,10)).astype(np.float16)
+ >>> box1=torch.from_numpy(a).to("npu")
+ >>> box2=torch.from_numpy(a).to("npu")
+ >>> output = torch.npu_giou(box1, box2, trans=True, is_cross=False, mode=0)
+ >>> output
+ tensor([[1.],
+ [1.],
+ [1.],
+ [1.],
+ [1.],
+ [1.],
+ [1.],
+ [1.],
+ [1.],
+ [1.]], device='npu:0', dtype=torch.float16)
+ ```
+
+> npu_silu(self) -> Tensor
+
+Computes the for the Swish of "x" .
+
+- Parameters:
+
+ - **self** (Tensor) - A Tensor. Must be one of the following types: float16, float32
+
+- constraints:
+
+ None
+
+- Examples:
+```python
+>>> a=torch.rand(2,8).npu()
+>>> output = torch.npu_silu(a)
+>>> output
+tensor([[0.4397, 0.7178, 0.5190, 0.2654, 0.2230, 0.2674, 0.6051, 0.3522],
+ [0.4679, 0.1764, 0.6650, 0.3175, 0.0530, 0.4787, 0.5621, 0.4026]],
+ device='npu:0')
+```
+
+> npu_reshape(self, shape, bool can_refresh=False) -> Tensor
+
+Reshapes a tensor. Only the tensor shape is changed, without changing the data.
+
+- Parameters:
+
+ - **self** (Tensor) - A Tensor.
+ - **shape** (ListInt) - Defines the shape of the output tensor.
+ - **can_refresh** (bool) - Used to specify whether reshape can be refreshed in place.
+
+- constraints:
+
+ This operator cannot be directly called by the acllopExecute API.
+
+- Examples:
+ ```python
+ >>> a=torch.rand(2,8).npu()
+ >>> out=torch.npu_reshape(a,(4,4))
+ >>> out
+ tensor([[0.6657, 0.9857, 0.7614, 0.4368],
+ [0.3761, 0.4397, 0.8609, 0.5544],
+ [0.7002, 0.3063, 0.9279, 0.5085],
+ [0.1009, 0.7133, 0.8118, 0.6193]], device='npu:0')
+ ```
+
+> npu_rotated_overlaps(self, query_boxes, trans=False) -> Tensor
+
+Calculate the overlapping area of the rotated box.
+
+- Parameters:
+
+ - **self** (Tensor) - data of grad increment, a 3D Tensor of type float32 with shape (B, 5, N).
+ - **query_boxes** (Tensor) - Bounding boxes, a 3D Tensor of type float32 with shape (B, 5, K).
+ - **trans** (bool) - An optional attr, true for 'xyxyt', false for 'xywht'.
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> a=np.random.uniform(0,1,(1,3,5)).astype(np.float16)
+ >>> b=np.random.uniform(0,1,(1,2,5)).astype(np.float16)
+ >>> box1=torch.from_numpy(a).to("npu")
+ >>> box2=torch.from_numpy(a).to("npu")
+ >>> output = torch.npu_rotated_overlaps(box1, box2, trans=False)
+ >>> output
+ tensor([[[0.0000, 0.1562, 0.0000],
+ [0.1562, 0.3713, 0.0611],
+ [0.0000, 0.0611, 0.0000]]], device='npu:0', dtype=torch.float16)
+ ```
+
+> npu_rotated_iou(self, query_boxes, trans=False, mode=0, is_cross=True) -> Tensor
+
+Calculate the IOU of the rotated box.
+
+- Parameters:
+
+ - **self** (Tensor) - data of grad increment, a 3D Tensor of type float32 with shape (B, 5, N).
+ - **query_boxes** (Tensor) - Bounding boxes, a 3D Tensor of type float32 with shape (B, 5, K).
+ - **trans** (bool) - An optional attr, true for 'xyxyt', false for 'xywht'.
+ - **is_cross** (bool) -Cross calculation when it is True, and one-to-one calculation when it is False.
+ - **mode** (Number) - Computation mode, a character string with the value range of [iou, iof, giou] .
+
+- constraints:
+
+ None
+
+- Examples:
+ ```python
+ >>> a=np.random.uniform(0,1,(2,2,5)).astype(np.float16)
+ >>> b=np.random.uniform(0,1,(2,3,5)).astype(np.float16)
+ >>> box1=torch.from_numpy(a).to("npu")
+ >>> box2=torch.from_numpy(a).to("npu")
+ >>> output = torch.npu_rotated_iou(box1, box2, trans=False, mode=0, is_cross=True)
+ >>> output
+ tensor([[[3.3325e-01, 1.0162e-01],
+ [1.0162e-01, 1.0000e+00]],
+
+ [[0.0000e+00, 0.0000e+00],
+ [0.0000e+00, 5.9605e-08]]], device='npu:0', dtype=torch.float16)
+ ```
+
+> npu_rotated_box_encode(anchor_box, gt_bboxes, weight) -> Tensor
+
+Rotate Bounding Box Encoding.
+
+- Parameters:
+
+ - anchor_box (Tensor) - A 3D Tensor with shape (B, 5, N). the input tensor.Anchor boxes. "B" indicates the number of batch size, "N" indicates the number of bounding boxes, and the value "5" refers to "x0", "x1", "y0", "y1" and "angle" .
+ - gt_bboxes (Tensor) - A 3D Tensor of float32 (float16) with shape (B, 5, N).
+ - weight (Tensor) - A float list for "x0", "x1", "y0", "y1" and "angle", defaults to [1.0, 1.0, 1.0, 1.0, 1.0].
+
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> anchor_boxes = torch.tensor([[[30.69], [32.6], [45.94], [59.88], [-44.53]]], dtype=torch.float16).to("npu")
+ >>> gt_bboxes = torch.tensor([[[30.44], [18.72], [33.22], [45.56], [8.5]]], dtype=torch.float16).to("npu")
+ >>> weight = torch.tensor([1., 1., 1., 1., 1.], dtype=torch.float16).npu()
+ >>> out = torch.npu_rotated_box_encode(anchor_boxes, gt_bboxes, weight)
+ >>> out
+ tensor([[[-0.4253],
+ [-0.5166],
+ [-1.7021],
+ [-0.0162],
+ [ 1.1328]]], device='npu:0', dtype=torch.float16)
```
+> npu_rotated_box_decode(anchor_boxes, deltas, weight) -> Tensor
+
+Rotate Bounding Box Encoding
+
+- Parameters:
+
+ - anchor_box (Tensor) - A 3D Tensor with shape (B, 5, N). the input tensor.Anchor boxes. "B" indicates the number of batch size, "N" indicates the number of bounding boxes, and the value "5" refers to "x0", "x1", "y0", "y1" and "angle" .
+ - deltas (Tensor) - A 3D Tensor of float32 (float16) with shape (B, 5, N).
+ - weight (Tensor) - A float list for "x0", "x1", "y0", "y1" and "angle", defaults to [1.0, 1.0, 1.0, 1.0, 1.0].
+- constraints:
+
+ None
+
+- Examples:
+
+ ```python
+ >>> anchor_boxes = torch.tensor([[[4.137],[33.72],[29.4], [54.06], [41.28]]], dtype=torch.float16).to("npu")
+ >>> deltas = torch.tensor([[[0.0244], [-1.992], [0.2109], [0.315], [-37.25]]], dtype=torch.float16).to("npu")
+ >>> weight = torch.tensor([1., 1., 1., 1., 1.], dtype=torch.float16).npu()
+ >>> out = torch.npu_rotated_box_decode(anchor_boxes, deltas, weight)
+ >>> out
+ tensor([[[ 1.7861],
+ [-10.5781],
+ [ 33.0000],
+ [ 17.2969],
+ [-88.4375]]], device='npu:0', dtype=torch.float16)
+ ```
diff --git "a/docs/zh/PyTorch\345\256\211\350\243\205\346\214\207\345\215\227/PyTorch\345\256\211\350\243\205\346\214\207\345\215\227.md" "b/docs/zh/PyTorch\345\256\211\350\243\205\346\214\207\345\215\227/PyTorch\345\256\211\350\243\205\346\214\207\345\215\227.md"
index 3bf9d29807a6a6b8813cc7d9478fe45d59ef9b2b..449b41865960cde4a8640c594d00d863e3d7099e 100644
--- "a/docs/zh/PyTorch\345\256\211\350\243\205\346\214\207\345\215\227/PyTorch\345\256\211\350\243\205\346\214\207\345\215\227.md"
+++ "b/docs/zh/PyTorch\345\256\211\350\243\205\346\214\207\345\215\227/PyTorch\345\256\211\350\243\205\346\214\207\345\215\227.md"
@@ -11,7 +11,7 @@
- [安装“torch-\*.whl ”提示“torch 1.5.0xxxx”与“torchvision”所依赖的版本不匹配](#安装-torch--whl-提示-torch-1-5-0xxxx-与-torchvision-所依赖的版本不匹配md)
简介
-用户在准备相关环境进行基于PyTorch框架模型的开发、运行时,可以选择在服务器中手动编译安装PyTorch框架相关模块。
+用户在准备相关环境进行基于PyTorch框架模型的开发、运行时,可以选择在服务器中手动编译安装PyTorch框架相关模块。
**图 1** 环境准备流程图
@@ -33,10 +33,16 @@
#### 前提条件
-- 需完成CANN开发或运行环境的安装,具体操作请参考《CANN 软件安装指南》。
-- 需安装3.12.0以上版本的CMake,安装方法请参考[CMake安装方法](#CMake安装方法md)。
-- 需确保已安装7.3.0以上版本的gcc,7.3.0版本gcc具体安装及使用方式请参考[安装7.3.0版本gcc](#安装7-3-0版本gccmd)。
-- 需安装python版本为3.7.5、3.8、3.9。
+- 需完成CANN开发或运行环境的安装,具体操作请参考《CANN 软件安装指南》。
+
+- 需安装3.12.0以上版本的CMake,安装方法请参考[CMake安装方法](#CMake安装方法md)。
+
+- 需确保已安装7.3.0以上版本的gcc,7.3.0版本gcc具体安装及使用方式请参考[安装7.3.0版本gcc](#安装7-3-0版本gccmd)。
+
+- 需安装python版本为3.7.5、3.8、3.9。
+
+- 需注意torch1.5版本不支持python3.9编译安装(与官方保持一致),仅torch1.8.1版本支持python版本3.9进行编译安装。
+
- 需确保环境中已安装patch、git工具,以Ubuntu和CentOS系统为例,命令如下:
- Ubuntu系统
@@ -146,7 +152,7 @@
或
bash build.sh --python=3.8
或
- bash build.sh --python=3.9
+ bash build.sh --python=3.9 #torch1.5不支持使用python3.9编译安装
```
请指定环境中python版本进行编译。生成的二进制包在当前的dist目录下,即“pytorch/pytorch/dist”文件夹目录下。
diff --git "a/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227.md" "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227.md"
index bd5c1d664dfa0c6c6321bf95c1044a048df8d198..176c1f806ab0bfb07a71941ac5fbd0ae1f5030ca 100644
--- "a/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227.md"
+++ "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227.md"
@@ -13,9 +13,7 @@
- [性能调优和分析](#性能调优和分析md)
- [精度调测](#精度调测md)
- [模型保存与转换](#模型保存与转换md)
-- [样例说明](#样例说明md)
- - [ResNet50模型迁移示例](#ResNet50模型迁移示例md)
- - [ShuffleNet模型调优示例](#ShuffleNet模型调优示例md)
+- [ShuffleNet模型调优示例](#ShuffleNet模型调优示例md)
- [参考信息](#参考信息md)
- [FAQ](#FAQmd)
- [软件安装常见问题](#软件安装常见问题md)
@@ -2050,8 +2048,101 @@ def main():
- 解决方案:减少编译或不需要编译该算子。
- 优化算子编译配置请参见[编译选项设置](#编译选项设置md)。
+### 端到端性能工具(E2E prof)使用说明
-亲和库
+#### E2E prof工具介绍
+
+E2E prof工具是一个将pytorch框架的profiling工具和cann prof工具获取到的框架层面数据和算子性能数据统一集成,实现端到端的模型和算子性能分析工具。
+
+#### E2E prof使用教程
+
+添加with语句使能E2E prof功能
+
+```
+with torch.npu.profile(profiler_result_path="./result",use_e2e_profiler=Ture):
+
+ model_train()
+```
+
+- profiler_result_path表示prof结果保存路径,默认为当前路径。
+- use_e2e_profiler表示是否开启E2E prof功能,默认为False(仅开启CANN prof功能)。
+
+(因NUP算子需要编译后才能执行,为保证数据的准确性,建议先运行10个step,在第十个step后再进行E2E prof操作,并且一般只需要profiling1个或者2个setp即可。)
+
+#### E2E prof结果解析
+
+通过E2E prof工具获得的结果为原始数据,需要通过解析后查看。
+
+1. 以使用教程中路径为例,工具会在profiler_result_path路径下创建文件夹以保存原始数据。
+
+2. 切换至如上图./result路径后,执行脚本。
+
+ ```
+ /usr/local/Ascend/ascend-toolkit/latest/toolkit/tools/profiler/bin/msprof --export=on --output=./
+ ```
+
+ - output:原始数据路径。
+
+3. 运行完成后,在原始数据路径下输出timeline目录。如下图:
+
+ 
+
+4. timeline路径下为解析得到的性能数据,可以通过chrome://tracing/中打开。
+
+ 1. 浏览器进入chrome://tracing/。
+
+ 2. 点击load,上传文件查看。
+
+
+
+ 内容示例如下图:
+
+
+
+ 该示例分为4个层次,由上到下,第一层(MsprofTx)为Pytorch框架数据,第二层(AscendCL)为ACL层面数据,第三层(Task Scheduler)为device数据,第四层(AI CPU)为AICPU数据。
+
+#### E2E prof高级设置
+
+E2E prof工具默认配置获取上述所有层面数据。获取数据过程亦会影响性能,若获取数据过多,会导致性能数据不具备参考价值。因此,E2E prof工具提供了可配置选项,用于精细化控制获取部分层面数据。
+
+```
+with torch.npu.profile(profiler_result_path="./results", use_e2e_profiler=True,config=torch.npu. profileConfig(ACL_PROF_ACL_API=True, ACL_PROF_TASK_TIME=True, ACL_PROF_AICORE_METRICS=True,ACL_PROF_AICPU=True, ACL_PROF_L2CACHE=True, ACL_PROF_HCCL_TRACE=True, ACL_PROF_TRAINING_TRACE=True, aiCoreMetricsType=0)):
+```
+
+- ACL_PROF_ACL_API:表示采集AscendCL接口的性能数据,默认True
+
+
+- ACL_PROF_TASK_TIME:采集AI Core算子的执行时间,默认True
+
+
+- ·ACL_PROF_AICORE_METRICS:表示采集AI Core性能指标数据,aicore_metrics入参处配置的性能指标采集项才有效,默认为True
+
+
+- ACL_PROF_AICPU:0x0008,集AI CPU任务的开始、结束轨迹数据,默认为True
+
+- · ACL_PROF_L2CACHE:表示采集L2 Cache数据,默认True
+
+- ACL_PROF_HCCL_TRACE:表示采集HCCL数据,默认为True
+
+- ACL_PROF_TRAINING_TRACE:表示迭代轨迹数据,记录模型正向和反向等步骤,默认为True
+
+其中,aiCoreMetricsType的取值和定义如下,默认为0:
+
+- ACL_AICORE_ARITHMETIC_UTILIZATION = 0:表示各种计算类指标占比统计,包括采集项mac_fp16_ratio、mac_int8_ratio、vec_fp32_ratio、vec_fp16_ratio、vec_int32_ratio、vec_misc_ratio
+
+- ACL_AICORE_PIPE_UTILIZATION = 1:表示计算单元和搬运单元耗时占比,包括采集项vec_ratio、mac_ratio、scalar_ratio、mte1_ratio、mte2_ratio、mte3_ratio、icache_miss_rate
+
+- ACL_AICORE_MEMORY_BANDWIDTH = 2:表示外部内存读写类指令占比,包括采集项ub_read_bw、ub_write_bw、l1_read_bw、l1_write_bw、l2_read_bw、l2_write_bw、main_mem_read_bw、main_mem_write_bw
+
+- ACL_AICORE_L0B_AND_WIDTH :表示内部内存读写类指令占比,包括采集项scalar_ld_ratio、scalar_st_ratio、l0a_read_bw、l0a_write_bw、l0b_read_bw、l0b_write_bw、l0c_read_bw、l0c_write_bw
+
+- ACL_AICORE_RESOURCE_CONFLICT_RATIO :表示流水线队列类指令占比,包括采集项vec_bankgroup_cflt_ratio、vec_bank_cflt_ratio、vec_resc_cflt_ratio、mte1_iq_full_ratio、mte2_iq_full_ratio、mte3_iq_full_ratio、cube_iq_full_ratio、vec_iq_full_ratio、iq_full_ratio
+
+- ACL_AICORE_NONE = 0xFF:表示不采集
+
+
+
+### 亲和库
来源介绍
diff --git "a/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/1.png" "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/1.png"
new file mode 100644
index 0000000000000000000000000000000000000000..1c7c3c517beb810563232e71e93698a74106fc09
Binary files /dev/null and "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/1.png" differ
diff --git "a/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/2.png" "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/2.png"
new file mode 100644
index 0000000000000000000000000000000000000000..927040832dcc49ff15f5a0d0e635179201e9b3a4
Binary files /dev/null and "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/2.png" differ
diff --git "a/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/3.png" "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/3.png"
new file mode 100644
index 0000000000000000000000000000000000000000..ea9ce0c03c7dcdfd0a2042d8fc98378befbf0f8b
Binary files /dev/null and "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/3.png" differ
diff --git "a/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/chrometracing.png" "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/chrometracing.png"
new file mode 100644
index 0000000000000000000000000000000000000000..47532e82e270b0f2bd3f81e3b8315dfd6c95bf56
Binary files /dev/null and "b/docs/zh/PyTorch\347\275\221\347\273\234\346\250\241\345\236\213\347\247\273\346\244\215&\350\256\255\347\273\203\346\214\207\345\215\227/figures/chrometracing.png" differ
diff --git a/patch/pytorch1.5.0_npu.patch b/patch/pytorch1.5.0_npu.patch
index 680930ca3be774b1815f85cfd29a1d8fb227043f..9025a34bb63a0beccc665fae41dee6a8bf924d82 100644
--- a/patch/pytorch1.5.0_npu.patch
+++ b/patch/pytorch1.5.0_npu.patch
@@ -1,6 +1,10 @@
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/CMakeLists.txt pytorch-develop-150/aten/CMakeLists.txt
--- pytorch-v1.5.0/aten/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/CMakeLists.txt 2021-12-21 12:00:44.614901109 +0800
+=======
+++ pytorch-develop-150/aten/CMakeLists.txt 2022-01-06 12:00:43.367558167 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -22,8 +22,10 @@
set(ATen_CPU_INCLUDE)
set(ATen_THIRD_PARTY_INCLUDE)
@@ -51,7 +55,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
set(ATen_CPU_DEPENDENCY_LIBS ${ATen_CPU_DEPENDENCY_LIBS} PARENT_SCOPE)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/CMakeLists.txt pytorch-develop-150/aten/src/ATen/CMakeLists.txt
--- pytorch-v1.5.0/aten/src/ATen/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/CMakeLists.txt 2021-12-21 12:00:44.614901109 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/CMakeLists.txt 2022-01-06 12:00:43.367558167 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -67,6 +67,9 @@
FILE(GLOB native_quantized_h "native/quantized/*.h" "native/quantized/cpu/*.h")
FILE(GLOB native_cpu_h "native/cpu/*.h")
@@ -129,7 +137,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
set(ATen_QUANTIZED_SRCS ${ATen_QUANTIZED_SRCS} PARENT_SCOPE)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/core/dispatch/DispatchTable.h pytorch-develop-150/aten/src/ATen/core/dispatch/DispatchTable.h
--- pytorch-v1.5.0/aten/src/ATen/core/dispatch/DispatchTable.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/core/dispatch/DispatchTable.h 2021-12-21 12:00:44.618901141 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/core/dispatch/DispatchTable.h 2022-01-06 12:00:43.371558194 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -170,7 +182,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/function_wrapper.py pytorch-develop-150/aten/src/ATen/function_wrapper.py
--- pytorch-v1.5.0/aten/src/ATen/function_wrapper.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/function_wrapper.py 2021-12-21 12:00:44.618901141 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/function_wrapper.py 2022-01-06 12:00:43.371558194 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -354,7 +370,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
for option in declaration['options']:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/gen.py pytorch-develop-150/aten/src/ATen/gen.py
--- pytorch-v1.5.0/aten/src/ATen/gen.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/gen.py 2021-12-21 12:00:44.618901141 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/gen.py 2022-01-06 12:00:43.371558194 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,18 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -512,7 +532,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
generate_outputs()
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/BatchLinearAlgebra.cpp pytorch-develop-150/aten/src/ATen/native/BatchLinearAlgebra.cpp
--- pytorch-v1.5.0/aten/src/ATen/native/BatchLinearAlgebra.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native/BatchLinearAlgebra.cpp 2021-12-21 12:00:44.618901141 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native/BatchLinearAlgebra.cpp 2022-01-06 12:00:43.375558222 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -680,7 +680,7 @@
std::tuple triangular_solve_out(Tensor& result, Tensor& clone_A, const Tensor& self, const Tensor& A,
bool upper, bool transpose, bool unitriangular) {
@@ -524,7 +548,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return std::tuple(result, clone_A);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/cpu/Activation.cpp pytorch-develop-150/aten/src/ATen/native/cpu/Activation.cpp
--- pytorch-v1.5.0/aten/src/ATen/native/cpu/Activation.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native/cpu/Activation.cpp 2021-12-21 12:00:44.622901173 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native/cpu/Activation.cpp 2022-01-06 12:00:43.375558222 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -339,20 +339,20 @@
void hardsigmoid_backward_kernel(TensorIterator& iter) {
@@ -552,7 +580,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
});
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/Memory.cpp pytorch-develop-150/aten/src/ATen/native/Memory.cpp
--- pytorch-v1.5.0/aten/src/ATen/native/Memory.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native/Memory.cpp 2021-12-21 12:00:44.622901173 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native/Memory.cpp 2022-01-06 12:00:43.375558222 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -614,7 +646,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
detail::computeStorageSize(self.sizes(), self.strides()),
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/native_functions.yaml pytorch-develop-150/aten/src/ATen/native/native_functions.yaml
--- pytorch-v1.5.0/aten/src/ATen/native/native_functions.yaml 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native/native_functions.yaml 2021-12-21 12:00:44.630901236 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native/native_functions.yaml 2022-01-06 12:00:43.383558277 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,6 +1,5 @@
# See README.md in this directory for more guidance
@@ -6690,7 +6726,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
- func: slow_conv_dilated3d(Tensor self, Tensor weight, int[3] kernel_size, Tensor? bias=None, int[3] stride=1, int[3] padding=0, int[3] dilation=1) -> Tensor
python_module: nn
+<<<<<<< HEAD
+@@ -6577,57 +8249,475 @@
+=======
@@ -6577,57 +8249,489 @@
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
dispatch:
CPU: col2im_out_cpu
CUDA: col2im_out_cuda
@@ -7173,6 +7213,15 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+ npu_dispatch_only:
+ NPU: rotated_overlaps_npu
+
+<<<<<<< HEAD
++- func: npu_rotated_iou(Tensor self, Tensor query_boxes, bool trans=False, int mode=0, bool is_cross=True) -> Tensor
++ npu_dispatch_only:
++ NPU: rotated_iou_npu
+\ No newline at end of file
+diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm/8x8-dq-aarch64-neon.S pytorch-develop-150/aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm/8x8-dq-aarch64-neon.S
+--- pytorch-v1.5.0/aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm/8x8-dq-aarch64-neon.S 2021-04-10 18:39:32.000000000 +0800
++++ pytorch-develop-150/aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm/8x8-dq-aarch64-neon.S 2021-12-21 12:00:44.646901363 +0800
+=======
+- func: npu_rotated_iou(Tensor self, Tensor query_boxes, bool trans=False, int mode=0, bool is_cross=True, float v_threshold=0.0, float e_threshold=0.0) -> Tensor
+ npu_dispatch_only:
+ NPU: rotated_iou_npu
@@ -7183,6 +7232,7 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm/8x8-dq-aarch64-neon.S pytorch-develop-150/aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm/8x8-dq-aarch64-neon.S
--- pytorch-v1.5.0/aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm/8x8-dq-aarch64-neon.S 2021-04-10 18:39:32.000000000 +0800
+++ pytorch-develop-150/aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm/8x8-dq-aarch64-neon.S 2022-01-06 12:00:43.395558360 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -659,14 +659,14 @@
SUB x1, x1, 4
@@ -7208,7 +7258,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
CMP x1, 2
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/TensorCompare.cpp pytorch-develop-150/aten/src/ATen/native/TensorCompare.cpp
--- pytorch-v1.5.0/aten/src/ATen/native/TensorCompare.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native/TensorCompare.cpp 2021-12-21 12:00:44.622901173 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native/TensorCompare.cpp 2022-01-06 12:00:43.375558222 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -64,7 +64,7 @@
Tensor isinf(const Tensor &self) {
@@ -7220,7 +7274,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return AT_DISPATCH_FLOATING_TYPES_AND_HALF(self.scalar_type(), "isinf", [&]() {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/TensorFactories.cpp pytorch-develop-150/aten/src/ATen/native/TensorFactories.cpp
--- pytorch-v1.5.0/aten/src/ATen/native/TensorFactories.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native/TensorFactories.cpp 2021-12-21 12:00:44.622901173 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native/TensorFactories.cpp 2022-01-06 12:00:43.375558222 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7265,7 +7323,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/TensorProperties.cpp pytorch-develop-150/aten/src/ATen/native/TensorProperties.cpp
--- pytorch-v1.5.0/aten/src/ATen/native/TensorProperties.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native/TensorProperties.cpp 2021-12-21 12:00:44.622901173 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native/TensorProperties.cpp 2022-01-06 12:00:43.375558222 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -87,6 +87,7 @@
if (self.is_contiguous(memory_format)) {
return self;
@@ -7276,7 +7338,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
"preserve memory format is unsupported by the contiguous operator");
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native/UpSampleBicubic2d.cpp pytorch-develop-150/aten/src/ATen/native/UpSampleBicubic2d.cpp
--- pytorch-v1.5.0/aten/src/ATen/native/UpSampleBicubic2d.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native/UpSampleBicubic2d.cpp 2021-12-21 12:00:44.622901173 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native/UpSampleBicubic2d.cpp 2022-01-06 12:00:43.375558222 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -26,7 +26,7 @@
const scalar_t* in = &idata[output_y * input_width + output_x];
scalar_t* out = &odata[output_y * output_width + output_x];
@@ -7288,7 +7354,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
out += output_width * output_height;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/native_parse.py pytorch-develop-150/aten/src/ATen/native_parse.py
--- pytorch-v1.5.0/aten/src/ATen/native_parse.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/native_parse.py 2021-12-21 12:00:44.654901427 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/native_parse.py 2022-01-06 12:00:43.403558415 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -7326,7 +7396,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
msg = '''Exception raised in processing function:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/preprocess_declarations.py pytorch-develop-150/aten/src/ATen/preprocess_declarations.py
--- pytorch-v1.5.0/aten/src/ATen/preprocess_declarations.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/preprocess_declarations.py 2021-12-21 12:00:44.654901427 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/preprocess_declarations.py 2022-01-06 12:00:43.403558415 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -7358,7 +7432,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/templates/TensorBody.h pytorch-develop-150/aten/src/ATen/templates/TensorBody.h
--- pytorch-v1.5.0/aten/src/ATen/templates/TensorBody.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/templates/TensorBody.h 2021-12-21 12:00:44.654901427 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/templates/TensorBody.h 2022-01-06 12:00:43.403558415 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7391,7 +7469,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/ATen/templates/TensorMethods.h pytorch-develop-150/aten/src/ATen/templates/TensorMethods.h
--- pytorch-v1.5.0/aten/src/ATen/templates/TensorMethods.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/ATen/templates/TensorMethods.h 2021-12-21 12:00:44.654901427 +0800
+=======
+++ pytorch-develop-150/aten/src/ATen/templates/TensorMethods.h 2022-01-06 12:00:43.403558415 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7425,7 +7507,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/TH/CMakeLists.txt pytorch-develop-150/aten/src/TH/CMakeLists.txt
--- pytorch-v1.5.0/aten/src/TH/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/TH/CMakeLists.txt 2021-12-21 12:00:44.658901459 +0800
+=======
+++ pytorch-develop-150/aten/src/TH/CMakeLists.txt 2022-01-06 12:00:43.403558415 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -48,6 +48,11 @@
${CMAKE_CURRENT_SOURCE_DIR}
PARENT_SCOPE)
@@ -7440,7 +7526,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/TH/generic/THStorage.cpp pytorch-develop-150/aten/src/TH/generic/THStorage.cpp
--- pytorch-v1.5.0/aten/src/TH/generic/THStorage.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/TH/generic/THStorage.cpp 2021-12-21 12:00:44.658901459 +0800
+=======
+++ pytorch-develop-150/aten/src/TH/generic/THStorage.cpp 2022-01-06 12:00:43.407558442 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,9 +1,32 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7549,7 +7639,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/aten/src/TH/generic/THStorage.h pytorch-develop-150/aten/src/TH/generic/THStorage.h
--- pytorch-v1.5.0/aten/src/TH/generic/THStorage.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/aten/src/TH/generic/THStorage.h 2021-12-21 12:00:44.658901459 +0800
+=======
+++ pytorch-develop-150/aten/src/TH/generic/THStorage.h 2022-01-06 12:00:43.407558442 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7588,7 +7682,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/CMakeLists.txt pytorch-develop-150/c10/CMakeLists.txt
--- pytorch-v1.5.0/c10/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/CMakeLists.txt 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/CMakeLists.txt 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -63,6 +63,14 @@
message(STATUS "don't use NUMA")
endif()
@@ -7617,7 +7715,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# not checked in
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/Backend.h pytorch-develop-150/c10/core/Backend.h
--- pytorch-v1.5.0/c10/core/Backend.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/Backend.h 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/Backend.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7714,7 +7816,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
case Backend::CUDA:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/Device.cpp pytorch-develop-150/c10/core/Device.cpp
--- pytorch-v1.5.0/c10/core/Device.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/Device.cpp 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/Device.cpp 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7754,7 +7860,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
types.begin(),
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/Device.h pytorch-develop-150/c10/core/Device.h
--- pytorch-v1.5.0/c10/core/Device.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/Device.h 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/Device.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7789,7 +7899,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return type_ == DeviceType::CPU;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/DeviceType.cpp pytorch-develop-150/c10/core/DeviceType.cpp
--- pytorch-v1.5.0/c10/core/DeviceType.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/DeviceType.cpp 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/DeviceType.cpp 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7829,7 +7943,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return false;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/DeviceType.h pytorch-develop-150/c10/core/DeviceType.h
--- pytorch-v1.5.0/c10/core/DeviceType.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/DeviceType.h 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/DeviceType.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7872,7 +7990,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
constexpr DeviceType kXLA = DeviceType::XLA;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/DispatchKey.cpp pytorch-develop-150/c10/core/DispatchKey.cpp
--- pytorch-v1.5.0/c10/core/DispatchKey.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/DispatchKey.cpp 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/DispatchKey.cpp 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7904,7 +8026,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
case DispatchKey::SparseCPUTensorId:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/DispatchKey.h pytorch-develop-150/c10/core/DispatchKey.h
--- pytorch-v1.5.0/c10/core/DispatchKey.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/DispatchKey.h 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/DispatchKey.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7936,7 +8062,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/Storage.h pytorch-develop-150/c10/core/Storage.h
--- pytorch-v1.5.0/c10/core/Storage.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/Storage.h 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/Storage.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -7970,7 +8100,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
};
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/StorageImpl.cpp pytorch-develop-150/c10/core/StorageImpl.cpp
--- pytorch-v1.5.0/c10/core/StorageImpl.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/StorageImpl.cpp 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/StorageImpl.cpp 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1 +1,18 @@
#include
+
@@ -7992,7 +8126,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+} // namespace c10
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/StorageImpl.h pytorch-develop-150/c10/core/StorageImpl.h
--- pytorch-v1.5.0/c10/core/StorageImpl.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/StorageImpl.h 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/StorageImpl.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,11 +1,55 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -8119,7 +8257,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/TensorImpl.h pytorch-develop-150/c10/core/TensorImpl.h
--- pytorch-v1.5.0/c10/core/TensorImpl.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/TensorImpl.h 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/TensorImpl.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -8187,7 +8329,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/core/TensorOptions.h pytorch-develop-150/c10/core/TensorOptions.h
--- pytorch-v1.5.0/c10/core/TensorOptions.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/core/TensorOptions.h 2021-12-21 12:00:44.666901522 +0800
+=======
+++ pytorch-develop-150/c10/core/TensorOptions.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -8228,7 +8374,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
} else if (tid == DispatchKey::HIPTensorId) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/cuda/CMakeLists.txt pytorch-develop-150/c10/cuda/CMakeLists.txt
--- pytorch-v1.5.0/c10/cuda/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/cuda/CMakeLists.txt 2021-12-21 12:00:44.670901554 +0800
+=======
+++ pytorch-develop-150/c10/cuda/CMakeLists.txt 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -24,6 +24,7 @@
CUDACachingAllocator.cpp
impl/CUDAGuardImpl.cpp
@@ -8247,7 +8397,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
torch_cuda_based_add_library(c10_cuda ${C10_CUDA_SRCS} ${C10_CUDA_HEADERS})
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/c10/macros/Export.h pytorch-develop-150/c10/macros/Export.h
--- pytorch-v1.5.0/c10/macros/Export.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/c10/macros/Export.h 2021-12-21 12:00:44.670901554 +0800
+=======
+++ pytorch-develop-150/c10/macros/Export.h 2022-01-06 12:00:43.415558497 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -8374,7 +8528,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-...
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/caffe2/CMakeLists.txt pytorch-develop-150/caffe2/CMakeLists.txt
--- pytorch-v1.5.0/caffe2/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/caffe2/CMakeLists.txt 2021-12-21 12:00:44.674901586 +0800
+=======
+++ pytorch-develop-150/caffe2/CMakeLists.txt 2022-01-06 12:00:43.419558525 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -32,6 +32,7 @@
# Add source, includes, and libs to lists
list(APPEND Caffe2_CPU_SRCS ${ATen_CPU_SRCS})
@@ -8529,7 +8687,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# Call again since Caffe2_HIP_INCLUDE is extended with ATen include dirs.
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/.clang-format pytorch-develop-150/.clang-format
--- pytorch-v1.5.0/.clang-format 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/.clang-format 2021-12-21 12:00:44.610901077 +0800
+=======
+++ pytorch-develop-150/.clang-format 2022-01-06 12:00:43.359558111 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -84,5 +84,4 @@
SpacesInSquareBrackets: false
Standard: Cpp11
@@ -8540,7 +8702,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
\ No newline at end of file
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/cmake/BuildVariables.cmake pytorch-develop-150/cmake/BuildVariables.cmake
--- pytorch-v1.5.0/cmake/BuildVariables.cmake 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/cmake/BuildVariables.cmake 2021-12-21 12:00:44.742902125 +0800
+=======
+++ pytorch-develop-150/cmake/BuildVariables.cmake 2022-01-06 12:00:43.475558912 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -11,6 +11,7 @@
# CMakeLists.txt files under each folder respectively.
set(Caffe2_CPU_SRCS)
@@ -8567,7 +8733,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# symbols. However, if the lib is whole linked in caffe2 lib, we don't want
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/cmake/Codegen.cmake pytorch-develop-150/cmake/Codegen.cmake
--- pytorch-v1.5.0/cmake/Codegen.cmake 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/cmake/Codegen.cmake 2021-12-21 12:00:44.742902125 +0800
+=======
+++ pytorch-develop-150/cmake/Codegen.cmake 2022-01-06 12:00:43.475558912 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -191,13 +191,14 @@
file(READ ${CMAKE_BINARY_DIR}/aten/src/ATen/generated_cpp.txt generated_cpp)
file(READ ${CMAKE_BINARY_DIR}/aten/src/ATen/generated_cpp.txt-cuda cuda_generated_cpp)
@@ -8598,7 +8768,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
endif()
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/cmake/Dependencies.cmake pytorch-develop-150/cmake/Dependencies.cmake
--- pytorch-v1.5.0/cmake/Dependencies.cmake 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/cmake/Dependencies.cmake 2021-12-21 12:00:44.742902125 +0800
+=======
+++ pytorch-develop-150/cmake/Dependencies.cmake 2022-01-06 12:00:43.475558912 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1509,6 +1509,13 @@
ENDIF(NOT C_HAS_THREAD)
endif()
@@ -8615,7 +8789,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
#
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/cmake/Summary.cmake pytorch-develop-150/cmake/Summary.cmake
--- pytorch-v1.5.0/cmake/Summary.cmake 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/cmake/Summary.cmake 2021-12-21 12:00:44.742902125 +0800
+=======
+++ pytorch-develop-150/cmake/Summary.cmake 2022-01-06 12:00:43.479558939 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -134,6 +134,7 @@
if(NOT "${SELECTED_OP_LIST}" STREQUAL "")
message(STATUS " SELECTED_OP_LIST : ${SELECTED_OP_LIST}")
@@ -8626,7 +8804,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
endfunction()
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/cmake/TorchConfig.cmake.in pytorch-develop-150/cmake/TorchConfig.cmake.in
--- pytorch-v1.5.0/cmake/TorchConfig.cmake.in 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/cmake/TorchConfig.cmake.in 2021-12-21 12:00:44.742902125 +0800
+=======
+++ pytorch-develop-150/cmake/TorchConfig.cmake.in 2022-01-06 12:00:43.479558939 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -112,6 +112,11 @@
list(APPEND TORCH_LIBRARIES ${TORCH_CUDA_LIBRARIES})
endif()
@@ -8641,7 +8823,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
set(TORCH_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=@GLIBCXX_USE_CXX11_ABI@")
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/CMakeLists.txt pytorch-develop-150/CMakeLists.txt
--- pytorch-v1.5.0/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/CMakeLists.txt 2021-12-21 12:00:44.610901077 +0800
+=======
+++ pytorch-develop-150/CMakeLists.txt 2022-01-06 12:00:43.359558111 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -205,6 +205,10 @@
option(USE_TBB "Use TBB" OFF)
option(ONNX_ML "Enable traditional ONNX ML API." ON)
@@ -8708,7 +8894,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-braces")
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/CONTRIBUTING.zh.md pytorch-develop-150/CONTRIBUTING.zh.md
--- pytorch-v1.5.0/CONTRIBUTING.zh.md 1970-01-01 08:00:00.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/CONTRIBUTING.zh.md 2021-12-21 12:00:44.610901077 +0800
+=======
+++ pytorch-develop-150/CONTRIBUTING.zh.md 2022-01-06 12:00:43.359558111 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -0,0 +1,228 @@
+# PyTorch贡献指南
+- [贡献者许可协议](#贡献者许可协议.md)
@@ -8940,7 +9130,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/.dockerignore pytorch-develop-150/.dockerignore
--- pytorch-v1.5.0/.dockerignore 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/.dockerignore 2021-12-21 12:00:44.610901077 +0800
+=======
+++ pytorch-develop-150/.dockerignore 2022-01-06 12:00:43.359558111 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,257 +1 @@
-# READ THIS BEFORE YOU REFACTOR ME
-#
@@ -9216,7 +9410,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
\ No newline at end of file
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/requirements.txt pytorch-develop-150/requirements.txt
--- pytorch-v1.5.0/requirements.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/requirements.txt 2021-12-21 12:00:44.610901077 +0800
+=======
+++ pytorch-develop-150/requirements.txt 2022-01-06 12:00:43.359558111 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -4,4 +4,13 @@
requests
setuptools
@@ -9236,7 +9434,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
\ No newline at end of file
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/setup.py pytorch-develop-150/setup.py
--- pytorch-v1.5.0/setup.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/setup.py 2021-12-21 12:00:44.610901077 +0800
+=======
+++ pytorch-develop-150/setup.py 2022-01-06 12:00:43.359558111 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -9339,7 +9541,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
'python/serialized_test/data/operator_test/*.zip',
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/test/distributed/test_c10d.py pytorch-develop-150/test/distributed/test_c10d.py
--- pytorch-v1.5.0/test/distributed/test_c10d.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/test/distributed/test_c10d.py 2021-12-21 12:00:44.758902252 +0800
+=======
+++ pytorch-develop-150/test/distributed/test_c10d.py 2022-01-06 12:00:43.491559022 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -3049,8 +3049,8 @@
model = self._create_mixed_precision_model()
reducer = self._create_reducer_for_models([model])
@@ -9353,7 +9559,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# Check that the grad of fc3 is not set.
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/test/run_test.py pytorch-develop-150/test/run_test.py
--- pytorch-v1.5.0/test/run_test.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/test/run_test.py 2021-12-21 12:00:44.762902284 +0800
+=======
+++ pytorch-develop-150/test/run_test.py 2022-01-06 12:00:43.495559049 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -11,6 +11,8 @@
import subprocess
import sys
@@ -9363,6 +9573,9 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
import torch
import torch._six
+<<<<<<< HEAD
+@@ -321,12 +323,109 @@
+=======
@@ -34,6 +36,7 @@
'test_dataloader',
'distributed/test_data_parallel',
@@ -9455,6 +9668,7 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
@@ -321,12 +358,109 @@
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
def __contains__(self, item):
return list.__contains__(self, parse_test_module(item))
@@ -9564,7 +9778,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
'-v',
'--verbose',
action='store_true',
+<<<<<<< HEAD
+@@ -647,6 +746,9 @@
+=======
@@ -647,6 +781,9 @@
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
# if determine_target(test, touched_files, options)
# ]
# sys.path.remove('test')
@@ -9574,7 +9792,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
for test in selected_tests:
+<<<<<<< HEAD
+@@ -655,17 +757,26 @@
+=======
@@ -655,17 +792,26 @@
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
# Printing the date here can help diagnose which tests are slow
print_to_stderr('Running {} ... [{}]'.format(test, datetime.now()))
handler = CUSTOM_HANDLERS.get(test, run_test)
@@ -9614,7 +9836,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
shell(['coverage', 'html'])
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/test/test_autograd.py pytorch-develop-150/test/test_autograd.py
--- pytorch-v1.5.0/test/test_autograd.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/test/test_autograd.py 2021-12-21 12:00:44.762902284 +0800
+=======
+++ pytorch-develop-150/test/test_autograd.py 2022-01-06 12:00:43.495559049 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -24,7 +24,7 @@
from torch.autograd.function import once_differentiable
from torch.autograd.profiler import (profile, format_time, EventList,
@@ -9645,7 +9871,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/test/test_nn.py pytorch-develop-150/test/test_nn.py
--- pytorch-v1.5.0/test/test_nn.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/test/test_nn.py 2021-12-21 12:00:44.766902316 +0800
+=======
+++ pytorch-develop-150/test/test_nn.py 2022-01-06 12:00:43.499559077 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -3535,14 +3535,17 @@
# earlier versions or no versions, it should provide default value of 0.
bn = nn.BatchNorm2d(3)
@@ -9668,7 +9898,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
@unittest.skipIf(not PY3, 'Python 2.7 generates cyclic trash')
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/test/test_torch.py pytorch-develop-150/test/test_torch.py
--- pytorch-v1.5.0/test/test_torch.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/test/test_torch.py 2021-12-21 12:00:44.782902443 +0800
+=======
+++ pytorch-develop-150/test/test_torch.py 2022-01-06 12:00:43.511559160 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -4087,6 +4087,9 @@
def test_print(self):
default_type = torch.Tensor().type()
@@ -9717,7 +9951,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
@onlyCPU
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/test/test_utils.py pytorch-develop-150/test/test_utils.py
--- pytorch-v1.5.0/test/test_utils.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/test/test_utils.py 2021-12-21 12:00:44.782902443 +0800
+=======
+++ pytorch-develop-150/test/test_utils.py 2022-01-06 12:00:43.511559160 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -6,6 +6,7 @@
import random
import tempfile
@@ -9736,7 +9974,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
load_tests = load_tests
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/derivatives.yaml pytorch-develop-150/tools/autograd/derivatives.yaml
--- pytorch-v1.5.0/tools/autograd/derivatives.yaml 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/derivatives.yaml 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/derivatives.yaml 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -107,6 +107,10 @@
#
# NB: The parameter names here MUST be consistent with the parameter names
@@ -9861,7 +10103,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
\ No newline at end of file
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/dump_utils.py pytorch-develop-150/tools/autograd/dump_utils.py
--- pytorch-v1.5.0/tools/autograd/dump_utils.py 1970-01-01 08:00:00.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/dump_utils.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/dump_utils.py 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -0,0 +1,312 @@
+# Copyright (c) 2021 Huawei Technologies Co., Ltd
+# All rights reserved.
@@ -10177,7 +10423,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+ return prepare_to_check_overflow, overflow_dump_inputs
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/gen_autograd_functions.py pytorch-develop-150/tools/autograd/gen_autograd_functions.py
--- pytorch-v1.5.0/tools/autograd/gen_autograd_functions.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/gen_autograd_functions.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/gen_autograd_functions.py 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2021 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -10383,7 +10633,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/gen_python_functions.py pytorch-develop-150/tools/autograd/gen_python_functions.py
--- pytorch-v1.5.0/tools/autograd/gen_python_functions.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/gen_python_functions.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/gen_python_functions.py 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,20 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -10425,7 +10679,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
'value': argname,
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/gen_variable_type.py pytorch-develop-150/tools/autograd/gen_variable_type.py
--- pytorch-v1.5.0/tools/autograd/gen_variable_type.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/gen_variable_type.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/gen_variable_type.py 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2021 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -10606,7 +10864,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/templates/Functions.cpp pytorch-develop-150/tools/autograd/templates/Functions.cpp
--- pytorch-v1.5.0/tools/autograd/templates/Functions.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/templates/Functions.cpp 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/templates/Functions.cpp 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2021 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -10687,7 +10949,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
auto sparse = sparse_.coalesce();
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/templates/python_torch_functions.cpp pytorch-develop-150/tools/autograd/templates/python_torch_functions.cpp
--- pytorch-v1.5.0/tools/autograd/templates/python_torch_functions.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/templates/python_torch_functions.cpp 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/templates/python_torch_functions.cpp 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -22,7 +22,7 @@
#include "torch/csrc/autograd/generated/variable_factories.h"
#include "torch/csrc/utils/structseq.h"
@@ -10771,7 +11037,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/templates/python_variable_methods.cpp pytorch-develop-150/tools/autograd/templates/python_variable_methods.cpp
--- pytorch-v1.5.0/tools/autograd/templates/python_variable_methods.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/templates/python_variable_methods.cpp 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/templates/python_variable_methods.cpp 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -15,7 +15,13 @@
#include "torch/csrc/cuda/Stream.h"
#include "torch/csrc/cuda/Event.h"
@@ -10866,7 +11136,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
{"has_names", (PyCFunction)THPVariable_has_names, METH_NOARGS, NULL},
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/templates/VariableType.cpp pytorch-develop-150/tools/autograd/templates/VariableType.cpp
--- pytorch-v1.5.0/tools/autograd/templates/VariableType.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/templates/VariableType.cpp 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/templates/VariableType.cpp 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,7 +1,29 @@
+// Copyright (c) 2021 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -10899,7 +11173,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/autograd/templates/VariableType.h pytorch-develop-150/tools/autograd/templates/VariableType.h
--- pytorch-v1.5.0/tools/autograd/templates/VariableType.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/autograd/templates/VariableType.h 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/autograd/templates/VariableType.h 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,20 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -10931,7 +11209,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
const at::Tensor & unpack(const Tensor & t, const char * name, int pos);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/tools/build_variables.bzl pytorch-develop-150/tools/build_variables.bzl
--- pytorch-v1.5.0/tools/build_variables.bzl 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/tools/build_variables.bzl 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/tools/build_variables.bzl 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -46,6 +46,7 @@
"torch/csrc/autograd/functions/utils.cpp",
"torch/csrc/autograd/input_buffer.cpp",
@@ -11017,7 +11299,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-def grad(outputs: _TensorOrTensors, inputs: _TensorOrTensors, grad_outputs: Optional[_TensorOrTensors]=..., retain_graph: Optional[bool]=..., create_graph: bool=..., only_inputs: bool=..., allow_unused: bool=...) -> Tuple[Tensor, ...]: ...
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/autograd/profiler.py pytorch-develop-150/torch/autograd/profiler.py
--- pytorch-v1.5.0/torch/autograd/profiler.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/autograd/profiler.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/torch/autograd/profiler.py 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,8 +1,25 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -11494,7 +11780,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return ''.join(result)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/CMakeLists.txt pytorch-develop-150/torch/CMakeLists.txt
--- pytorch-v1.5.0/torch/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/CMakeLists.txt 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/torch/CMakeLists.txt 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -97,6 +97,7 @@
${TORCH_SRC_DIR}/csrc/tensor/python_tensor.cpp
${TORCH_SRC_DIR}/csrc/utils.cpp
@@ -11526,7 +11816,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
endif()
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/engine.cpp pytorch-develop-150/torch/csrc/autograd/engine.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/engine.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/engine.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/engine.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -11678,7 +11972,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
auto event = c10::Event{c10::DeviceType::CUDA};
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/function.h pytorch-develop-150/torch/csrc/autograd/function.h
--- pytorch-v1.5.0/torch/csrc/autograd/function.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/function.h 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/function.h 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -11,6 +11,7 @@
#include
@@ -11700,7 +11998,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
// probably operate with names.
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/functions/tensor.cpp pytorch-develop-150/torch/csrc/autograd/functions/tensor.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/functions/tensor.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/functions/tensor.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/functions/tensor.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -11732,7 +12034,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
/*non_blocking=*/false,
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/init.cpp pytorch-develop-150/torch/csrc/autograd/init.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/init.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/init.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/init.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -11775,7 +12081,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
m.def("_enable_profiler", enableProfiler);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/input_buffer.cpp pytorch-develop-150/torch/csrc/autograd/input_buffer.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/input_buffer.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/input_buffer.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/input_buffer.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -11827,7 +12137,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
auto& old_var = buffer[pos];
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/profiler.cpp pytorch-develop-150/torch/csrc/autograd/profiler.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/profiler.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/profiler.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/profiler.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12067,7 +12381,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
CUDAStubs::~CUDAStubs() = default;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/profiler.h pytorch-develop-150/torch/csrc/autograd/profiler.h
--- pytorch-v1.5.0/torch/csrc/autograd/profiler.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/profiler.h 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/profiler.h 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12203,7 +12521,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/python_variable.cpp pytorch-develop-150/torch/csrc/autograd/python_variable.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/python_variable.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/python_variable.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/python_variable.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12257,7 +12579,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
{"is_complex", (getter)THPVariable_is_complex, nullptr, nullptr, nullptr},
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/python_variable_indexing.cpp pytorch-develop-150/torch/csrc/autograd/python_variable_indexing.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/python_variable_indexing.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/python_variable_indexing.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/python_variable_indexing.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12288,7 +12614,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
at::Device self_device = self_.device();
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/record_function.cpp pytorch-develop-150/torch/csrc/autograd/record_function.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/record_function.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/record_function.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/record_function.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -154,6 +154,12 @@
}
}
@@ -12322,7 +12652,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/record_function.h pytorch-develop-150/torch/csrc/autograd/record_function.h
--- pytorch-v1.5.0/torch/csrc/autograd/record_function.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/record_function.h 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/record_function.h 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -44,6 +44,9 @@
// Default constructor is used with before function called afterwards
RecordFunction() {}
@@ -12386,7 +12720,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
if (torch::autograd::profiler::needsInputs()) { \
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/utils/wrap_outputs.h pytorch-develop-150/torch/csrc/autograd/utils/wrap_outputs.h
--- pytorch-v1.5.0/torch/csrc/autograd/utils/wrap_outputs.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/utils/wrap_outputs.h 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/utils/wrap_outputs.h 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -168,6 +168,45 @@
return r.release();
}
@@ -12435,7 +12773,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
if (!r) throw python_error();
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/autograd/VariableTypeManual.cpp pytorch-develop-150/torch/csrc/autograd/VariableTypeManual.cpp
--- pytorch-v1.5.0/torch/csrc/autograd/VariableTypeManual.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/autograd/VariableTypeManual.cpp 2021-12-21 12:00:45.326906758 +0800
+=======
+++ pytorch-develop-150/torch/csrc/autograd/VariableTypeManual.cpp 2022-01-06 12:00:44.091563163 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12469,7 +12811,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
if (!t.defined()) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/distributed/c10d/comm.cpp pytorch-develop-150/torch/csrc/distributed/c10d/comm.cpp
--- pytorch-v1.5.0/torch/csrc/distributed/c10d/comm.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/distributed/c10d/comm.cpp 2021-12-21 12:00:45.330906789 +0800
+=======
+++ pytorch-develop-150/torch/csrc/distributed/c10d/comm.cpp 2022-01-06 12:00:44.095563191 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12575,7 +12921,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
while (!in_flight.empty()) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/distributed/c10d/init.cpp pytorch-develop-150/torch/csrc/distributed/c10d/init.cpp
--- pytorch-v1.5.0/torch/csrc/distributed/c10d/init.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/distributed/c10d/init.cpp 2021-12-21 12:00:45.330906789 +0800
+=======
+++ pytorch-develop-150/torch/csrc/distributed/c10d/init.cpp 2022-01-06 12:00:44.095563191 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12632,7 +12982,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
.def("is_success", &::c10d::ProcessGroup::Work::isSuccess)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/distributed/c10d/reducer.cpp pytorch-develop-150/torch/csrc/distributed/c10d/reducer.cpp
--- pytorch-v1.5.0/torch/csrc/distributed/c10d/reducer.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/distributed/c10d/reducer.cpp 2021-12-21 12:00:45.330906789 +0800
+=======
+++ pytorch-develop-150/torch/csrc/distributed/c10d/reducer.cpp 2022-01-06 12:00:44.095563191 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12845,7 +13199,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/DynamicTypes.cpp pytorch-develop-150/torch/csrc/DynamicTypes.cpp
--- pytorch-v1.5.0/torch/csrc/DynamicTypes.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/DynamicTypes.cpp 2021-12-21 12:00:45.322906726 +0800
+=======
+++ pytorch-develop-150/torch/csrc/DynamicTypes.cpp 2022-01-06 12:00:44.087563135 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12894,7 +13252,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return it->second;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/Generator.cpp pytorch-develop-150/torch/csrc/Generator.cpp
--- pytorch-v1.5.0/torch/csrc/Generator.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/Generator.cpp 2021-12-21 12:00:45.322906726 +0800
+=======
+++ pytorch-develop-150/torch/csrc/Generator.cpp 2022-01-06 12:00:44.087563135 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -12962,7 +13324,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
#endif
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/generic/serialization.cpp pytorch-develop-150/torch/csrc/generic/serialization.cpp
--- pytorch-v1.5.0/torch/csrc/generic/serialization.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/generic/serialization.cpp 2021-12-21 12:00:45.330906789 +0800
+=======
+++ pytorch-develop-150/torch/csrc/generic/serialization.cpp 2022-01-06 12:00:44.095563191 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -13062,7 +13428,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/generic/Storage.cpp pytorch-develop-150/torch/csrc/generic/Storage.cpp
--- pytorch-v1.5.0/torch/csrc/generic/Storage.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/generic/Storage.cpp 2021-12-21 12:00:45.330906789 +0800
+=======
+++ pytorch-develop-150/torch/csrc/generic/Storage.cpp 2022-01-06 12:00:44.095563191 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,7 +1,25 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -13141,7 +13511,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
for (Py_ssize_t i = 0; i < length; i++) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/generic/StorageMethods.cpp pytorch-develop-150/torch/csrc/generic/StorageMethods.cpp
--- pytorch-v1.5.0/torch/csrc/generic/StorageMethods.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/generic/StorageMethods.cpp 2021-12-21 12:00:45.330906789 +0800
+=======
+++ pytorch-develop-150/torch/csrc/generic/StorageMethods.cpp 2022-01-06 12:00:44.095563191 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -13189,7 +13563,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
{"_write_file", (PyCFunction)THPStorage_(writeFile), METH_VARARGS, nullptr},
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/Module.cpp pytorch-develop-150/torch/csrc/Module.cpp
--- pytorch-v1.5.0/torch/csrc/Module.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/Module.cpp 2021-12-21 12:00:45.322906726 +0800
+=======
+++ pytorch-develop-150/torch/csrc/Module.cpp 2022-01-06 12:00:44.087563135 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -13350,7 +13728,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
auto set_module_attr = [&](const char* name, PyObject* v, bool incref = true) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/tensor/python_tensor.cpp pytorch-develop-150/torch/csrc/tensor/python_tensor.cpp
--- pytorch-v1.5.0/torch/csrc/tensor/python_tensor.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/tensor/python_tensor.cpp 2021-12-21 12:00:45.338906853 +0800
+=======
+++ pytorch-develop-150/torch/csrc/tensor/python_tensor.cpp 2022-01-06 12:00:44.103563246 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,18 +1,35 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -13727,7 +14109,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+} // namespace torch
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/utils/init.cpp pytorch-develop-150/torch/csrc/utils/init.cpp
--- pytorch-v1.5.0/torch/csrc/utils/init.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/utils/init.cpp 2021-12-21 12:00:45.338906853 +0800
+=======
+++ pytorch-develop-150/torch/csrc/utils/init.cpp 2022-01-06 12:00:44.103563246 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,7 +1,13 @@
#include
#include
@@ -13892,7 +14278,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
} // namespace torch
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/utils/init.h pytorch-develop-150/torch/csrc/utils/init.h
--- pytorch-v1.5.0/torch/csrc/utils/init.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/utils/init.h 2021-12-21 12:00:45.338906853 +0800
+=======
+++ pytorch-develop-150/torch/csrc/utils/init.h 2022-01-06 12:00:44.103563246 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -8,4 +8,7 @@
void initThroughputBenchmarkBindings(PyObject* module);
@@ -13903,7 +14293,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
} // namespace torch
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/utils/python_arg_parser.h pytorch-develop-150/torch/csrc/utils/python_arg_parser.h
--- pytorch-v1.5.0/torch/csrc/utils/python_arg_parser.h 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/utils/python_arg_parser.h 2021-12-21 12:00:45.338906853 +0800
+=======
+++ pytorch-develop-150/torch/csrc/utils/python_arg_parser.h 2022-01-06 12:00:44.103563246 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -13938,7 +14332,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return at::Device(device_str);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/utils/tensor_layouts.cpp pytorch-develop-150/torch/csrc/utils/tensor_layouts.cpp
--- pytorch-v1.5.0/torch/csrc/utils/tensor_layouts.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/utils/tensor_layouts.cpp 2021-12-21 12:00:45.338906853 +0800
+=======
+++ pytorch-develop-150/torch/csrc/utils/tensor_layouts.cpp 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -13969,7 +14367,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
registerLayoutObject((THPLayout*)strided_layout, at::Backend::QuantizedCPU);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/utils/tensor_new.cpp pytorch-develop-150/torch/csrc/utils/tensor_new.cpp
--- pytorch-v1.5.0/torch/csrc/utils/tensor_new.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/utils/tensor_new.cpp 2021-12-21 12:00:45.338906853 +0800
+=======
+++ pytorch-develop-150/torch/csrc/utils/tensor_new.cpp 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -14105,7 +14507,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
" or ", c10::DispatchKey::XLATensorId,
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/csrc/utils/tensor_types.cpp pytorch-develop-150/torch/csrc/utils/tensor_types.cpp
--- pytorch-v1.5.0/torch/csrc/utils/tensor_types.cpp 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/csrc/utils/tensor_types.cpp 2021-12-21 12:00:45.338906853 +0800
+=======
+++ pytorch-develop-150/torch/csrc/utils/tensor_types.cpp 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,58 +1,91 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -14318,7 +14724,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-def get_rng_state(): ...
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/distributed/distributed_c10d.py pytorch-develop-150/torch/distributed/distributed_c10d.py
--- pytorch-v1.5.0/torch/distributed/distributed_c10d.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/distributed/distributed_c10d.py 2021-12-21 12:00:45.338906853 +0800
+=======
+++ pytorch-develop-150/torch/distributed/distributed_c10d.py 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -14399,7 +14809,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/__init__.py pytorch-develop-150/torch/__init__.py
--- pytorch-v1.5.0/torch/__init__.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/__init__.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/torch/__init__.py 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -14442,7 +14856,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
\ No newline at end of file
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/jit/frontend.py pytorch-develop-150/torch/jit/frontend.py
--- pytorch-v1.5.0/torch/jit/frontend.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/jit/frontend.py 2021-12-21 12:00:45.342906884 +0800
+=======
+++ pytorch-develop-150/torch/jit/frontend.py 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -616,6 +616,17 @@
return Subscript(base, [build_SliceExpr(ctx, base, expr.slice)])
elif sub_type is ast.ExtSlice:
@@ -14463,7 +14881,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/lib/c10d/CMakeLists.txt pytorch-develop-150/torch/lib/c10d/CMakeLists.txt
--- pytorch-v1.5.0/torch/lib/c10d/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/lib/c10d/CMakeLists.txt 2021-12-21 12:00:45.342906884 +0800
+=======
+++ pytorch-develop-150/torch/lib/c10d/CMakeLists.txt 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -28,6 +28,10 @@
option(USE_C10D_NCCL "USE C10D NCCL" ON)
endif()
@@ -14537,7 +14959,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
virtual std::shared_ptr allreduce_coalesced(
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/lib/libshm/CMakeLists.txt pytorch-develop-150/torch/lib/libshm/CMakeLists.txt
--- pytorch-v1.5.0/torch/lib/libshm/CMakeLists.txt 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/lib/libshm/CMakeLists.txt 2021-12-21 12:00:45.342906884 +0800
+=======
+++ pytorch-develop-150/torch/lib/libshm/CMakeLists.txt 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -37,8 +37,11 @@
SET_TARGET_PROPERTIES(shm PROPERTIES
PREFIX "lib"
@@ -14594,7 +15020,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-_maybe_indices_t = _scalar_or_tuple_2_t[Tensor]
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/nn/functional.py pytorch-develop-150/torch/nn/functional.py
--- pytorch-v1.5.0/torch/nn/functional.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/nn/functional.py 2021-12-21 12:00:45.342906884 +0800
+=======
+++ pytorch-develop-150/torch/nn/functional.py 2022-01-06 12:00:44.111563301 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1611,7 +1611,7 @@
else:
output = input.matmul(weight.t())
@@ -14617,7 +15047,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-from . import parallel as parallel
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/nn/modules/batchnorm.py pytorch-develop-150/torch/nn/modules/batchnorm.py
--- pytorch-v1.5.0/torch/nn/modules/batchnorm.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/nn/modules/batchnorm.py 2021-12-21 12:00:45.342906884 +0800
+=======
+++ pytorch-develop-150/torch/nn/modules/batchnorm.py 2022-01-06 12:00:44.111563301 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -14663,7 +15097,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/nn/modules/module.py pytorch-develop-150/torch/nn/modules/module.py
--- pytorch-v1.5.0/torch/nn/modules/module.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/nn/modules/module.py 2021-12-21 12:00:45.342906884 +0800
+=======
+++ pytorch-develop-150/torch/nn/modules/module.py 2022-01-06 12:00:44.111563301 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -14823,7 +15261,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return t.to(device, dtype if t.is_floating_point() else None, non_blocking, memory_format=convert_to_format)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/nn/modules/normalization.py pytorch-develop-150/torch/nn/modules/normalization.py
--- pytorch-v1.5.0/torch/nn/modules/normalization.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/nn/modules/normalization.py 2021-12-21 12:00:45.342906884 +0800
+=======
+++ pytorch-develop-150/torch/nn/modules/normalization.py 2022-01-06 12:00:44.111563301 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -128,13 +128,14 @@
"""
__constants__ = ['normalized_shape', 'eps', 'elementwise_affine']
@@ -14892,7 +15334,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
- module_kwargs: Optional[Any] = ...) -> Tensor: ...
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/nn/parallel/distributed.py pytorch-develop-150/torch/nn/parallel/distributed.py
--- pytorch-v1.5.0/torch/nn/parallel/distributed.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/nn/parallel/distributed.py 2021-12-21 12:00:45.346906916 +0800
+=======
+++ pytorch-develop-150/torch/nn/parallel/distributed.py 2022-01-06 12:00:44.111563301 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -15247,7 +15693,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-def remove_weight_norm(module: T_module, name: str = ...) -> T_module: ...
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/onnx/symbolic_opset9.py pytorch-develop-150/torch/onnx/symbolic_opset9.py
--- pytorch-v1.5.0/torch/onnx/symbolic_opset9.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/onnx/symbolic_opset9.py 2021-12-21 12:00:45.346906916 +0800
+=======
+++ pytorch-develop-150/torch/onnx/symbolic_opset9.py 2022-01-06 12:00:44.111563301 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1621,14 +1621,23 @@
slices = [sym_help._slice_helper(g, w, axes=[0], starts=[x * n], ends=[y * n]) for x, y in intervals]
return g.op('Concat', *slices, axis_i=0)
@@ -15325,7 +15775,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
- def __init__(self, params: _params_t, lr: float=..., lr_decay: float=..., weight_decay: float=..., initial_accumulator_value: float=..., eps: float=...) -> None: ...
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/optim/adamax.py pytorch-develop-150/torch/optim/adamax.py
--- pytorch-v1.5.0/torch/optim/adamax.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/optim/adamax.py 2021-12-21 12:00:45.346906916 +0800
+=======
+++ pytorch-develop-150/torch/optim/adamax.py 2022-01-06 12:00:44.111563301 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -80,8 +80,8 @@
exp_inf.mul_(beta2).unsqueeze(0),
grad.abs().add_(eps).unsqueeze_(0)
@@ -15502,7 +15956,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
- def __init__(self, params: _params_t, lr: float=..., betas: Tuple[float, float]=..., eps: float=...) -> None: ...
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/serialization.py pytorch-develop-150/torch/serialization.py
--- pytorch-v1.5.0/torch/serialization.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/serialization.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/torch/serialization.py 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -15586,7 +16044,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
def location_tag(storage):
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/storage.py pytorch-develop-150/torch/storage.py
--- pytorch-v1.5.0/torch/storage.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/storage.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/torch/storage.py 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -7,6 +7,7 @@
class _StorageBase(object):
@@ -15606,7 +16068,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
else:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/tensor.py pytorch-develop-150/torch/tensor.py
--- pytorch-v1.5.0/torch/tensor.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/tensor.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/torch/tensor.py 2022-01-06 12:00:44.107563273 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -15668,7 +16134,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
def __reversed__(self):
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/_tensor_str.py pytorch-develop-150/torch/_tensor_str.py
--- pytorch-v1.5.0/torch/_tensor_str.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/_tensor_str.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/torch/_tensor_str.py 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -15722,7 +16192,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
has_default_dtype = self.dtype in (torch.get_default_dtype(), torch.int64, torch.bool)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/utils/data/dataloader.py pytorch-develop-150/torch/utils/data/dataloader.py
--- pytorch-v1.5.0/torch/utils/data/dataloader.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/utils/data/dataloader.py 2021-12-21 12:00:45.346906916 +0800
+=======
+++ pytorch-develop-150/torch/utils/data/dataloader.py 2022-01-06 12:00:44.115563328 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -15931,7 +16405,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
- def __init__(self, sampler: Sampler[int], batch_size: int, drop_last: bool) -> None: ...
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/utils/data/_utils/pin_memory.py pytorch-develop-150/torch/utils/data/_utils/pin_memory.py
--- pytorch-v1.5.0/torch/utils/data/_utils/pin_memory.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/utils/data/_utils/pin_memory.py 2021-12-21 12:00:45.346906916 +0800
+=======
+++ pytorch-develop-150/torch/utils/data/_utils/pin_memory.py 2022-01-06 12:00:44.115563328 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -15992,7 +16470,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/utils/__init__.py pytorch-develop-150/torch/utils/__init__.py
--- pytorch-v1.5.0/torch/utils/__init__.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/utils/__init__.py 2021-12-21 12:00:45.346906916 +0800
+=======
+++ pytorch-develop-150/torch/utils/__init__.py 2022-01-06 12:00:44.115563328 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,6 +1,9 @@
from __future__ import absolute_import, division, print_function, unicode_literals
@@ -16005,7 +16487,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
def set_module(obj, mod):
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.5.0/torch/_utils.py pytorch-develop-150/torch/_utils.py
--- pytorch-v1.5.0/torch/_utils.py 2021-04-10 18:39:32.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-150/torch/_utils.py 2021-12-21 12:00:45.318906694 +0800
+=======
+++ pytorch-develop-150/torch/_utils.py 2022-01-06 12:00:44.083563107 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
diff --git a/patch/pytorch1.8.1_npu.patch b/patch/pytorch1.8.1_npu.patch
index f854ee9f99c3be0574ae838284a3a8597cd2cd38..c7a98f2827b73f0c66d1008955f83bee9380f026 100644
--- a/patch/pytorch1.8.1_npu.patch
+++ b/patch/pytorch1.8.1_npu.patch
@@ -1,6 +1,10 @@
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/CMakeLists.txt pytorch-develop-181/aten/CMakeLists.txt
--- pytorch-v1.8.1/aten/CMakeLists.txt 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/CMakeLists.txt 2021-12-21 12:00:49.426939248 +0800
+=======
+++ pytorch-develop-181/aten/CMakeLists.txt 2022-01-06 12:00:48.187591423 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -22,9 +22,11 @@
set(ATen_CPU_INCLUDE)
set(ATen_THIRD_PARTY_INCLUDE)
@@ -52,7 +56,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
set(ATen_CPU_DEPENDENCY_LIBS ${ATen_CPU_DEPENDENCY_LIBS} PARENT_SCOPE)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/autocast_mode.h pytorch-develop-181/aten/src/ATen/autocast_mode.h
--- pytorch-v1.8.1/aten/src/ATen/autocast_mode.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/autocast_mode.h 2021-12-21 12:00:49.430939280 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/autocast_mode.h 2022-01-06 12:00:48.195591478 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -5,7 +5,7 @@
namespace {
@@ -64,7 +72,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/CMakeLists.txt pytorch-develop-181/aten/src/ATen/CMakeLists.txt
--- pytorch-v1.8.1/aten/src/ATen/CMakeLists.txt 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/CMakeLists.txt 2021-12-21 12:00:49.426939248 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/CMakeLists.txt 2022-01-06 12:00:48.191591450 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -85,6 +85,10 @@
file(GLOB native_quantized_h "native/quantized/*.h" "native/quantized/cpu/*.h")
file(GLOB native_cpu_h "native/cpu/*.h")
@@ -115,7 +127,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
set(ATen_HIP_SRCS ${ATen_HIP_SRCS} PARENT_SCOPE)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/core/dispatch/Dispatcher.h pytorch-develop-181/aten/src/ATen/core/dispatch/Dispatcher.h
--- pytorch-v1.8.1/aten/src/ATen/core/dispatch/Dispatcher.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/core/dispatch/Dispatcher.h 2021-12-21 12:00:49.434939312 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/core/dispatch/Dispatcher.h 2022-01-06 12:00:48.199591505 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -417,6 +417,11 @@
}
}
@@ -130,7 +146,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/core/dispatch/ObservedOperators.cpp pytorch-develop-181/aten/src/ATen/core/dispatch/ObservedOperators.cpp
--- pytorch-v1.8.1/aten/src/ATen/core/dispatch/ObservedOperators.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/core/dispatch/ObservedOperators.cpp 2021-12-21 12:00:49.434939312 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/core/dispatch/ObservedOperators.cpp 2022-01-06 12:00:48.199591505 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -6,6 +6,7 @@
namespace c10 {
@@ -141,7 +161,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
std::unordered_set not_observed_ops = {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/core/dispatch/ObservedOperators.h pytorch-develop-181/aten/src/ATen/core/dispatch/ObservedOperators.h
--- pytorch-v1.8.1/aten/src/ATen/core/dispatch/ObservedOperators.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/core/dispatch/ObservedOperators.h 2021-12-21 12:00:49.434939312 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/core/dispatch/ObservedOperators.h 2022-01-06 12:00:48.199591505 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,12 +1,16 @@
#pragma once
@@ -161,7 +185,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/core/dispatch/OperatorEntry.h pytorch-develop-181/aten/src/ATen/core/dispatch/OperatorEntry.h
--- pytorch-v1.8.1/aten/src/ATen/core/dispatch/OperatorEntry.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/core/dispatch/OperatorEntry.h 2021-12-21 12:00:49.434939312 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/core/dispatch/OperatorEntry.h 2022-01-06 12:00:48.199591505 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -10,6 +10,7 @@
#include
#include
@@ -172,7 +200,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
#include
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/core/VariableFallbackKernel.cpp pytorch-develop-181/aten/src/ATen/core/VariableFallbackKernel.cpp
--- pytorch-v1.8.1/aten/src/ATen/core/VariableFallbackKernel.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/core/VariableFallbackKernel.cpp 2021-12-21 12:00:49.434939312 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/core/VariableFallbackKernel.cpp 2022-01-06 12:00:48.195591478 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -48,4 +48,8 @@
m.fallback(torch::CppFunction::makeFallthrough());
}
@@ -184,7 +216,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/native/Convolution.cpp pytorch-develop-181/aten/src/ATen/native/Convolution.cpp
--- pytorch-v1.8.1/aten/src/ATen/native/Convolution.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/native/Convolution.cpp 2021-12-21 12:00:49.446939407 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/native/Convolution.cpp 2022-01-06 12:00:48.211591588 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -603,7 +603,9 @@
const Tensor& input, const Tensor& weight, const Tensor& bias,
IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation,
@@ -198,7 +234,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
at::Tensor _convolution(
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/native/Memory.cpp pytorch-develop-181/aten/src/ATen/native/Memory.cpp
--- pytorch-v1.8.1/aten/src/ATen/native/Memory.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/native/Memory.cpp 2021-12-21 12:00:49.450939438 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/native/Memory.cpp 2022-01-06 12:00:48.211591588 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -249,7 +289,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
detail::computeStorageNbytes(
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/native/native_functions.yaml pytorch-develop-181/aten/src/ATen/native/native_functions.yaml
--- pytorch-v1.8.1/aten/src/ATen/native/native_functions.yaml 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/native/native_functions.yaml 2021-12-21 12:00:49.486939723 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/native/native_functions.yaml 2022-01-06 12:00:48.247591837 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -2073,6 +2073,8 @@
dispatch:
CPU, CUDA: isnan
@@ -480,7 +524,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+- func: npu_apply_adam.out(Scalar beta1_power, Scalar beta2_power, Scalar lr, Scalar beta1, Scalar beta2, Scalar epsilon, Tensor grad, bool? use_locking, bool? use_nesterov, *, Tensor(a!) var, Tensor(b!) m, Tensor(c!) v) -> (Tensor(a!), Tensor(b!), Tensor(c!))
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/native/NPUVariableMethodStubs.cpp pytorch-develop-181/aten/src/ATen/native/NPUVariableMethodStubs.cpp
--- pytorch-v1.8.1/aten/src/ATen/native/NPUVariableMethodStubs.cpp 1970-01-01 08:00:00.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/native/NPUVariableMethodStubs.cpp 2021-12-21 12:00:49.450939438 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/native/NPUVariableMethodStubs.cpp 2022-01-06 12:00:48.215591616 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -0,0 +1,464 @@
+#include "ATen/native/npu/common/FormatCastHelper.h"
+#include "ATen/native/npu/frame/FormatHelper.h"
@@ -1864,7 +1912,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/native/TensorFactories.cpp pytorch-develop-181/aten/src/ATen/native/TensorFactories.cpp
--- pytorch-v1.8.1/aten/src/ATen/native/TensorFactories.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/native/TensorFactories.cpp 2021-12-21 12:00:49.466939565 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/native/TensorFactories.cpp 2022-01-06 12:00:48.227591698 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,20 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -1897,7 +1949,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
namespace {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/native/vulkan/api/vk_mem_alloc.h pytorch-develop-181/aten/src/ATen/native/vulkan/api/vk_mem_alloc.h
--- pytorch-v1.8.1/aten/src/ATen/native/vulkan/api/vk_mem_alloc.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/native/vulkan/api/vk_mem_alloc.h 2021-12-21 12:00:49.518939977 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/native/vulkan/api/vk_mem_alloc.h 2022-01-06 12:00:48.283592085 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,19229 +1,19229 @@
-//
-// Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
@@ -40359,7 +40415,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+#endif // #ifdef VMA_IMPLEMENTATION
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/record_function.cpp pytorch-develop-181/aten/src/ATen/record_function.cpp
--- pytorch-v1.8.1/aten/src/ATen/record_function.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/record_function.cpp 2021-12-21 12:00:49.522940009 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/record_function.cpp 2022-01-06 12:00:48.287592112 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -400,6 +400,9 @@
rf_tls_.tls_record_function_enabled_ = enable;
}
@@ -40372,7 +40432,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
if (rf_tls_ptr->tls_record_function_enabled_) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/record_function.h pytorch-develop-181/aten/src/ATen/record_function.h
--- pytorch-v1.8.1/aten/src/ATen/record_function.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/record_function.h 2021-12-21 12:00:49.522940009 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/record_function.h 2022-01-06 12:00:48.287592112 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -2,6 +2,7 @@
#include
@@ -40408,7 +40472,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
// scope - record scope that this function tracks
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/templates/TensorBody.h pytorch-develop-181/aten/src/ATen/templates/TensorBody.h
--- pytorch-v1.8.1/aten/src/ATen/templates/TensorBody.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/templates/TensorBody.h 2021-12-21 12:00:49.522940009 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/templates/TensorBody.h 2022-01-06 12:00:48.291592140 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40441,7 +40509,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
bool is_xpu() const;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/templates/TensorMethods.cpp pytorch-develop-181/aten/src/ATen/templates/TensorMethods.cpp
--- pytorch-v1.8.1/aten/src/ATen/templates/TensorMethods.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/templates/TensorMethods.cpp 2021-12-21 12:00:49.522940009 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/templates/TensorMethods.cpp 2022-01-06 12:00:48.291592140 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40486,7 +40558,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/ATen/Utils.cpp pytorch-develop-181/aten/src/ATen/Utils.cpp
--- pytorch-v1.8.1/aten/src/ATen/Utils.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/ATen/Utils.cpp 2021-12-21 12:00:49.430939280 +0800
+=======
+++ pytorch-develop-181/aten/src/ATen/Utils.cpp 2022-01-06 12:00:48.191591450 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,18 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40530,7 +40606,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/TH/generic/THStorage.cpp pytorch-develop-181/aten/src/TH/generic/THStorage.cpp
--- pytorch-v1.8.1/aten/src/TH/generic/THStorage.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/TH/generic/THStorage.cpp 2021-12-21 12:00:49.526940041 +0800
+=======
+++ pytorch-develop-181/aten/src/TH/generic/THStorage.cpp 2022-01-06 12:00:48.295592167 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,9 +1,32 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40643,7 +40723,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/aten/src/TH/generic/THStorage.h pytorch-develop-181/aten/src/TH/generic/THStorage.h
--- pytorch-v1.8.1/aten/src/TH/generic/THStorage.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/aten/src/TH/generic/THStorage.h 2021-12-21 12:00:49.526940041 +0800
+=======
+++ pytorch-develop-181/aten/src/TH/generic/THStorage.h 2022-01-06 12:00:48.295592167 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40682,7 +40766,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/CMakeLists.txt pytorch-develop-181/c10/CMakeLists.txt
--- pytorch-v1.8.1/c10/CMakeLists.txt 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/CMakeLists.txt 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/CMakeLists.txt 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -79,6 +79,14 @@
message(STATUS "don't use NUMA")
endif()
@@ -40711,7 +40799,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# not checked in
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/Backend.h pytorch-develop-181/c10/core/Backend.h
--- pytorch-v1.8.1/c10/core/Backend.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/Backend.h 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/core/Backend.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40805,7 +40897,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/Device.cpp pytorch-develop-181/c10/core/Device.cpp
--- pytorch-v1.8.1/c10/core/Device.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/Device.cpp 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/core/Device.cpp 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40836,7 +40932,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
types.begin(),
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/Device.h pytorch-develop-181/c10/core/Device.h
--- pytorch-v1.8.1/c10/core/Device.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/Device.h 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/core/Device.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40871,7 +40971,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
bool is_cpu() const noexcept {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/DeviceType.cpp pytorch-develop-181/c10/core/DeviceType.cpp
--- pytorch-v1.8.1/c10/core/DeviceType.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/DeviceType.cpp 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/core/DeviceType.cpp 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40911,7 +41015,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return false;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/DeviceType.h pytorch-develop-181/c10/core/DeviceType.h
--- pytorch-v1.8.1/c10/core/DeviceType.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/DeviceType.h 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/core/DeviceType.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -40953,7 +41061,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
constexpr DeviceType kMSNPU = DeviceType::MSNPU;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/DispatchKey.cpp pytorch-develop-181/c10/core/DispatchKey.cpp
--- pytorch-v1.8.1/c10/core/DispatchKey.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/DispatchKey.cpp 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/core/DispatchKey.cpp 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,18 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -41002,7 +41114,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
case DispatchKey::PrivateUse1:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/DispatchKey.h pytorch-develop-181/c10/core/DispatchKey.h
--- pytorch-v1.8.1/c10/core/DispatchKey.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/DispatchKey.h 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/core/DispatchKey.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -41049,7 +41165,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
PrivateUse3_PreAutograd = AutogradPrivateUse3,
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/DispatchKeySet.cpp pytorch-develop-181/c10/core/DispatchKeySet.cpp
--- pytorch-v1.8.1/c10/core/DispatchKeySet.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/DispatchKeySet.cpp 2021-12-21 12:00:49.538940136 +0800
+=======
+++ pytorch-develop-181/c10/core/DispatchKeySet.cpp 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -11,6 +11,7 @@
DispatchKey::XLA,
DispatchKey::NestedTensor,
@@ -41069,7 +41189,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
case DispatchKey::AutogradXPU:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/DispatchKeySet.h pytorch-develop-181/c10/core/DispatchKeySet.h
--- pytorch-v1.8.1/c10/core/DispatchKeySet.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/DispatchKeySet.h 2021-12-21 12:00:49.542940167 +0800
+=======
+++ pytorch-develop-181/c10/core/DispatchKeySet.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -193,6 +193,7 @@
DispatchKey::AutogradCPU,
DispatchKey::AutogradCUDA,
@@ -41080,7 +41204,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
DispatchKey::AutogradPrivateUse1,
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/Storage.h pytorch-develop-181/c10/core/Storage.h
--- pytorch-v1.8.1/c10/core/Storage.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/Storage.h 2021-12-21 12:00:49.542940167 +0800
+=======
+++ pytorch-develop-181/c10/core/Storage.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -41114,7 +41242,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
};
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/StorageImpl.h pytorch-develop-181/c10/core/StorageImpl.h
--- pytorch-v1.8.1/c10/core/StorageImpl.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/StorageImpl.h 2021-12-21 12:00:49.542940167 +0800
+=======
+++ pytorch-develop-181/c10/core/StorageImpl.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,12 +1,42 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -41174,7 +41306,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/TensorImpl.h pytorch-develop-181/c10/core/TensorImpl.h
--- pytorch-v1.8.1/c10/core/TensorImpl.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/TensorImpl.h 2021-12-21 12:00:49.542940167 +0800
+=======
+++ pytorch-develop-181/c10/core/TensorImpl.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -41217,7 +41353,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return ts.has(DispatchKey::SparseCPU) ||
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/core/TensorOptions.h pytorch-develop-181/c10/core/TensorOptions.h
--- pytorch-v1.8.1/c10/core/TensorOptions.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/core/TensorOptions.h 2021-12-21 12:00:49.542940167 +0800
+=======
+++ pytorch-develop-181/c10/core/TensorOptions.h 2022-01-06 12:00:48.307592251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -41258,7 +41398,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
} else if (tid == DispatchKey::QuantizedXPU) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/c10/macros/Export.h pytorch-develop-181/c10/macros/Export.h
--- pytorch-v1.8.1/c10/macros/Export.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/c10/macros/Export.h 2021-12-21 12:00:49.542940167 +0800
+=======
+++ pytorch-develop-181/c10/macros/Export.h 2022-01-06 12:00:48.311592278 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -41327,7 +41471,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
#define C10_API_ENUM C10_API
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/caffe2/CMakeLists.txt pytorch-develop-181/caffe2/CMakeLists.txt
--- pytorch-v1.8.1/caffe2/CMakeLists.txt 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/caffe2/CMakeLists.txt 2021-12-21 12:00:49.550940231 +0800
+=======
+++ pytorch-develop-181/caffe2/CMakeLists.txt 2022-01-06 12:00:48.319592333 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -76,6 +76,7 @@
# Add source, includes, and libs to lists
list(APPEND Caffe2_CPU_SRCS ${ATen_CPU_SRCS})
@@ -41452,7 +41600,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# Call again since Caffe2_HIP_INCLUDE is extended with ATen include dirs.
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/cmake/BuildVariables.cmake pytorch-develop-181/cmake/BuildVariables.cmake
--- pytorch-v1.8.1/cmake/BuildVariables.cmake 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/cmake/BuildVariables.cmake 2021-12-21 12:00:49.622940800 +0800
+=======
+++ pytorch-develop-181/cmake/BuildVariables.cmake 2022-01-06 12:00:48.395592857 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -11,6 +11,7 @@
# CMakeLists.txt files under each folder respectively.
set(Caffe2_CPU_SRCS)
@@ -41476,7 +41628,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# symbols. However, if the lib is whole linked in caffe2 lib, we don't want
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/cmake/Codegen.cmake pytorch-develop-181/cmake/Codegen.cmake
--- pytorch-v1.8.1/cmake/Codegen.cmake 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/cmake/Codegen.cmake 2021-12-21 12:00:49.622940800 +0800
+=======
+++ pytorch-develop-181/cmake/Codegen.cmake 2022-01-06 12:00:48.395592857 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -208,13 +208,14 @@
file(READ ${CMAKE_BINARY_DIR}/aten/src/ATen/generated_cpp.txt generated_cpp)
file(READ ${CMAKE_BINARY_DIR}/aten/src/ATen/generated_cpp.txt-cuda cuda_generated_cpp)
@@ -41509,7 +41665,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
function(append_filelist name outputvar)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/cmake/Dependencies.cmake pytorch-develop-181/cmake/Dependencies.cmake
--- pytorch-v1.8.1/cmake/Dependencies.cmake 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/cmake/Dependencies.cmake 2021-12-21 12:00:49.626940832 +0800
+=======
+++ pytorch-develop-181/cmake/Dependencies.cmake 2022-01-06 12:00:48.395592857 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1771,6 +1771,13 @@
endif(NOT C_HAS_THREAD)
endif()
@@ -41526,7 +41686,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
#
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/cmake/Summary.cmake pytorch-develop-181/cmake/Summary.cmake
--- pytorch-v1.8.1/cmake/Summary.cmake 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/cmake/Summary.cmake 2021-12-21 12:00:49.626940832 +0800
+=======
+++ pytorch-develop-181/cmake/Summary.cmake 2022-01-06 12:00:48.395592857 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -127,6 +127,7 @@
message(STATUS " USE_MKLDNN_CBLAS : ${USE_MKLDNN_CBLAS}")
endif()
@@ -41545,7 +41709,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
message(STATUS " Private Dependencies : ${Caffe2_DEPENDENCY_LIBS}")
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/cmake/TorchConfig.cmake.in pytorch-develop-181/cmake/TorchConfig.cmake.in
--- pytorch-v1.8.1/cmake/TorchConfig.cmake.in 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/cmake/TorchConfig.cmake.in 2021-12-21 12:00:49.626940832 +0800
+=======
+++ pytorch-develop-181/cmake/TorchConfig.cmake.in 2022-01-06 12:00:48.395592857 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -158,6 +158,11 @@
list(APPEND TORCH_LIBRARIES ${TORCH_CUDA_LIBRARIES})
endif()
@@ -41560,7 +41728,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
set(TORCH_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=@GLIBCXX_USE_CXX11_ABI@")
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/CMakeLists.txt pytorch-develop-181/CMakeLists.txt
--- pytorch-v1.8.1/CMakeLists.txt 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/CMakeLists.txt 2021-12-21 12:00:49.418939185 +0800
+=======
+++ pytorch-develop-181/CMakeLists.txt 2022-01-06 12:00:48.179591368 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -261,6 +261,10 @@
"USE_DISTRIBUTED" OFF)
option(USE_TBB "Use TBB" OFF)
@@ -41604,7 +41776,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
if(APPLE)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/setup.py pytorch-develop-181/setup.py
--- pytorch-v1.8.1/setup.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/setup.py 2021-12-21 12:00:49.638940927 +0800
+=======
+++ pytorch-develop-181/setup.py 2022-01-06 12:00:48.411592967 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -41673,7 +41849,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
'utils/benchmark/utils/valgrind_wrapper/*.h',
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/tools/autograd/derivatives.yaml pytorch-develop-181/tools/autograd/derivatives.yaml
--- pytorch-v1.8.1/tools/autograd/derivatives.yaml 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/tools/autograd/derivatives.yaml 2021-12-21 12:00:50.090944505 +0800
+=======
+++ pytorch-develop-181/tools/autograd/derivatives.yaml 2022-01-06 12:00:48.879596196 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1976,3 +1976,7 @@
- name: nonzero(Tensor self) -> Tensor
@@ -41684,7 +41864,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
+ mat2: npu_bmm_v2_mat2_backward(grad, self, mat2, mat2.sizes())
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/tools/autograd/gen_python_functions.py pytorch-develop-181/tools/autograd/gen_python_functions.py
--- pytorch-v1.8.1/tools/autograd/gen_python_functions.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/tools/autograd/gen_python_functions.py 2021-12-21 12:00:50.090944505 +0800
+=======
+++ pytorch-develop-181/tools/autograd/gen_python_functions.py 2022-01-06 12:00:48.879596196 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,20 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -41708,7 +41892,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# The bindings are generated as methods on python_variable or functions on the
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/tools/autograd/templates/Functions.cpp pytorch-develop-181/tools/autograd/templates/Functions.cpp
--- pytorch-v1.8.1/tools/autograd/templates/Functions.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/tools/autograd/templates/Functions.cpp 2021-12-21 12:00:50.090944505 +0800
+=======
+++ pytorch-develop-181/tools/autograd/templates/Functions.cpp 2022-01-06 12:00:48.879596196 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -14,6 +14,35 @@
namespace torch { namespace autograd { namespace generated {
@@ -41747,7 +41935,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}}} // namespace torch::autograd::generated
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/tools/autograd/templates/python_torch_functions.cpp pytorch-develop-181/tools/autograd/templates/python_torch_functions.cpp
--- pytorch-v1.8.1/tools/autograd/templates/python_torch_functions.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/tools/autograd/templates/python_torch_functions.cpp 2021-12-21 12:00:50.090944505 +0800
+=======
+++ pytorch-develop-181/tools/autograd/templates/python_torch_functions.cpp 2022-01-06 12:00:48.879596196 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -30,7 +30,7 @@
#include "torch/csrc/autograd/generated/variable_factories.h"
#include "torch/csrc/utils/structseq.h"
@@ -41783,7 +41975,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return torch::range(start, end, step, options);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/tools/autograd/templates/python_variable_methods.cpp pytorch-develop-181/tools/autograd/templates/python_variable_methods.cpp
--- pytorch-v1.8.1/tools/autograd/templates/python_variable_methods.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/tools/autograd/templates/python_variable_methods.cpp 2021-12-21 12:00:50.090944505 +0800
+=======
+++ pytorch-develop-181/tools/autograd/templates/python_variable_methods.cpp 2022-01-06 12:00:48.879596196 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -20,7 +20,13 @@
#ifdef USE_CUDA
#include "torch/csrc/cuda/Event.h"
@@ -41851,7 +42047,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
{"has_names", THPVariable_has_names, METH_NOARGS, NULL},
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/tools/build_variables.bzl pytorch-develop-181/tools/build_variables.bzl
--- pytorch-v1.8.1/tools/build_variables.bzl 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/tools/build_variables.bzl 2021-12-21 12:00:50.090944505 +0800
+=======
+++ pytorch-develop-181/tools/build_variables.bzl 2022-01-06 12:00:48.879596196 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -362,6 +362,7 @@
libtorch_cuda_core_sources = [
"torch/csrc/CudaIPCTypes.cpp",
@@ -41870,7 +42070,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
"torch/csrc/utils/python_arg_parser.cpp",
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/tools/codegen/gen.py pytorch-develop-181/tools/codegen/gen.py
--- pytorch-v1.8.1/tools/codegen/gen.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/tools/codegen/gen.py 2021-12-21 12:00:50.094944536 +0800
+=======
+++ pytorch-develop-181/tools/codegen/gen.py 2022-01-06 12:00:48.883596224 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -815,7 +815,7 @@
core_fm = make_file_manager(core_install_dir)
cpu_fm = make_file_manager(options.install_dir)
@@ -41918,7 +42122,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
main()
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/tools/codegen/model.py pytorch-develop-181/tools/codegen/model.py
--- pytorch-v1.8.1/tools/codegen/model.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/tools/codegen/model.py 2021-12-21 12:00:50.094944536 +0800
+=======
+++ pytorch-develop-181/tools/codegen/model.py 2022-01-06 12:00:48.883596224 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -79,6 +79,7 @@
SparseHIP = auto()
SparseXPU = auto()
@@ -42060,7 +42268,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
-)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/autograd/profiler.py pytorch-develop-181/torch/autograd/profiler.py
--- pytorch-v1.8.1/torch/autograd/profiler.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/autograd/profiler.py 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/autograd/profiler.py 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -37,14 +37,17 @@
class EventList(list):
"""A list of Events (for pretty printing)"""
@@ -42739,7 +42951,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return ''.join(result)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/_C/_autograd.pyi pytorch-develop-181/torch/_C/_autograd.pyi
--- pytorch-v1.8.1/torch/_C/_autograd.pyi 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/_C/_autograd.pyi 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/_C/_autograd.pyi 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -9,14 +9,17 @@
CUDA = ...
NVTX = ...
@@ -42760,7 +42976,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
class ProfilerConfig:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/CMakeLists.txt pytorch-develop-181/torch/CMakeLists.txt
--- pytorch-v1.8.1/torch/CMakeLists.txt 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/CMakeLists.txt 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/CMakeLists.txt 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -131,6 +131,20 @@
endif()
@@ -42784,7 +43004,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
list(APPEND TORCH_PYTHON_SRCS ${GENERATED_THNN_CXX_CUDA})
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/autograd/engine.cpp pytorch-develop-181/torch/csrc/autograd/engine.cpp
--- pytorch-v1.8.1/torch/csrc/autograd/engine.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/autograd/engine.cpp 2021-12-21 12:00:50.102944600 +0800
+=======
+++ pytorch-develop-181/torch/csrc/autograd/engine.cpp 2022-01-06 12:00:48.895596306 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -42881,7 +43105,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
auto outputs = call_function(graph_task, func, inputs);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/autograd/functions/tensor.cpp pytorch-develop-181/torch/csrc/autograd/functions/tensor.cpp
--- pytorch-v1.8.1/torch/csrc/autograd/functions/tensor.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/autograd/functions/tensor.cpp 2021-12-21 12:00:50.106944631 +0800
+=======
+++ pytorch-develop-181/torch/csrc/autograd/functions/tensor.cpp 2022-01-06 12:00:48.895596306 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -42913,7 +43141,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
/*non_blocking=*/false,
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/autograd/init.cpp pytorch-develop-181/torch/csrc/autograd/init.cpp
--- pytorch-v1.8.1/torch/csrc/autograd/init.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/autograd/init.cpp 2021-12-21 12:00:50.106944631 +0800
+=======
+++ pytorch-develop-181/torch/csrc/autograd/init.cpp 2022-01-06 12:00:48.895596306 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -52,6 +52,7 @@
.value("Disabled", ProfilerState::Disabled)
.value("CPU", ProfilerState::CPU)
@@ -42956,7 +43188,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
.value("OPENCL", c10::DeviceType::OPENCL)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/autograd/input_buffer.cpp pytorch-develop-181/torch/csrc/autograd/input_buffer.cpp
--- pytorch-v1.8.1/torch/csrc/autograd/input_buffer.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/autograd/input_buffer.cpp 2021-12-21 12:00:50.106944631 +0800
+=======
+++ pytorch-develop-181/torch/csrc/autograd/input_buffer.cpp 2022-01-06 12:00:48.895596306 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -43008,7 +43244,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
auto& old_var = buffer[pos];
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/autograd/profiler_legacy.cpp pytorch-develop-181/torch/csrc/autograd/profiler_legacy.cpp
--- pytorch-v1.8.1/torch/csrc/autograd/profiler_legacy.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/autograd/profiler_legacy.cpp 2021-12-21 12:00:50.106944631 +0800
+=======
+++ pytorch-develop-181/torch/csrc/autograd/profiler_legacy.cpp 2022-01-06 12:00:48.895596306 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -147,7 +147,7 @@
constexpr const CUDAStubs* default_stubs_addr = &default_stubs;
// Constant initialization, so it is guaranteed to be initialized before
@@ -43251,7 +43491,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
CUDAStubs::~CUDAStubs() = default;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/autograd/profiler_legacy.h pytorch-develop-181/torch/csrc/autograd/profiler_legacy.h
--- pytorch-v1.8.1/torch/csrc/autograd/profiler_legacy.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/autograd/profiler_legacy.h 2021-12-21 12:00:50.106944631 +0800
+=======
+++ pytorch-develop-181/torch/csrc/autograd/profiler_legacy.h 2022-01-06 12:00:48.895596306 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -19,6 +19,8 @@
#include // for gettimeofday()
#endif
@@ -43440,7 +43684,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
std::vector&& remoteProfiledEvents);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/autograd/python_variable.cpp pytorch-develop-181/torch/csrc/autograd/python_variable.cpp
--- pytorch-v1.8.1/torch/csrc/autograd/python_variable.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/autograd/python_variable.cpp 2021-12-21 12:00:50.106944631 +0800
+=======
+++ pytorch-develop-181/torch/csrc/autograd/python_variable.cpp 2022-01-06 12:00:48.895596306 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -43494,7 +43742,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
{"is_mkldnn", (getter)THPVariable_is_mkldnn, nullptr, nullptr, nullptr},
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/autograd/python_variable_indexing.cpp pytorch-develop-181/torch/csrc/autograd/python_variable_indexing.cpp
--- pytorch-v1.8.1/torch/csrc/autograd/python_variable_indexing.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/autograd/python_variable_indexing.cpp 2021-12-21 12:00:50.106944631 +0800
+=======
+++ pytorch-develop-181/torch/csrc/autograd/python_variable_indexing.cpp 2022-01-06 12:00:48.895596306 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -43527,7 +43779,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/distributed/c10d/init.cpp pytorch-develop-181/torch/csrc/distributed/c10d/init.cpp
--- pytorch-v1.8.1/torch/csrc/distributed/c10d/init.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/distributed/c10d/init.cpp 2021-12-21 12:00:50.110944664 +0800
+=======
+++ pytorch-develop-181/torch/csrc/distributed/c10d/init.cpp 2022-01-06 12:00:48.899596334 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -43694,7 +43950,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
torch::class_<::c10d::DistributedC10d>("dist_c10d", "frontend")
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/DynamicTypes.cpp pytorch-develop-181/torch/csrc/DynamicTypes.cpp
--- pytorch-v1.8.1/torch/csrc/DynamicTypes.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/DynamicTypes.cpp 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/csrc/DynamicTypes.cpp 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -43743,7 +44003,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return it->second;
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/Generator.cpp pytorch-develop-181/torch/csrc/Generator.cpp
--- pytorch-v1.8.1/torch/csrc/Generator.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/Generator.cpp 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/csrc/Generator.cpp 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -43790,7 +44054,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
" is not supported for torch.Generator() api.");
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/generic/serialization.cpp pytorch-develop-181/torch/csrc/generic/serialization.cpp
--- pytorch-v1.8.1/torch/csrc/generic/serialization.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/generic/serialization.cpp 2021-12-21 12:00:50.110944664 +0800
+=======
+++ pytorch-develop-181/torch/csrc/generic/serialization.cpp 2022-01-06 12:00:48.899596334 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -43888,7 +44156,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/generic/Storage.cpp pytorch-develop-181/torch/csrc/generic/Storage.cpp
--- pytorch-v1.8.1/torch/csrc/generic/Storage.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/generic/Storage.cpp 2021-12-21 12:00:50.110944664 +0800
+=======
+++ pytorch-develop-181/torch/csrc/generic/Storage.cpp 2022-01-06 12:00:48.899596334 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,7 +1,25 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -43968,7 +44240,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
for (Py_ssize_t i = 0; i < length; i++) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/generic/StorageMethods.cpp pytorch-develop-181/torch/csrc/generic/StorageMethods.cpp
--- pytorch-v1.8.1/torch/csrc/generic/StorageMethods.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/generic/StorageMethods.cpp 2021-12-21 12:00:50.110944664 +0800
+=======
+++ pytorch-develop-181/torch/csrc/generic/StorageMethods.cpp 2022-01-06 12:00:48.899596334 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -44048,7 +44324,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
};
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/Module.cpp pytorch-develop-181/torch/csrc/Module.cpp
--- pytorch-v1.8.1/torch/csrc/Module.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/Module.cpp 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/csrc/Module.cpp 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -44174,7 +44454,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
if (incref) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/tensor/python_tensor.cpp pytorch-develop-181/torch/csrc/tensor/python_tensor.cpp
--- pytorch-v1.8.1/torch/csrc/tensor/python_tensor.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/tensor/python_tensor.cpp 2021-12-21 12:00:50.138944885 +0800
+=======
+++ pytorch-develop-181/torch/csrc/tensor/python_tensor.cpp 2022-01-06 12:00:48.927596527 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,18 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -44212,7 +44496,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/utils/python_arg_parser.h pytorch-develop-181/torch/csrc/utils/python_arg_parser.h
--- pytorch-v1.8.1/torch/csrc/utils/python_arg_parser.h 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/utils/python_arg_parser.h 2021-12-21 12:00:50.138944885 +0800
+=======
+++ pytorch-develop-181/torch/csrc/utils/python_arg_parser.h 2022-01-06 12:00:48.927596527 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -44247,7 +44535,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return at::Device(device_str);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/utils/tensor_layouts.cpp pytorch-develop-181/torch/csrc/utils/tensor_layouts.cpp
--- pytorch-v1.8.1/torch/csrc/utils/tensor_layouts.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/utils/tensor_layouts.cpp 2021-12-21 12:00:50.138944885 +0800
+=======
+++ pytorch-develop-181/torch/csrc/utils/tensor_layouts.cpp 2022-01-06 12:00:48.927596527 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -44278,7 +44570,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
PyObject *sparse_coo_layout = THPLayout_New(at::Layout::Sparse, "torch.sparse_coo");
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/utils/tensor_new.cpp pytorch-develop-181/torch/csrc/utils/tensor_new.cpp
--- pytorch-v1.8.1/torch/csrc/utils/tensor_new.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/utils/tensor_new.cpp 2021-12-21 12:00:50.138944885 +0800
+=======
+++ pytorch-develop-181/torch/csrc/utils/tensor_new.cpp 2022-01-06 12:00:48.927596527 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -44410,7 +44706,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
dispatch_key);
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/csrc/utils/tensor_types.cpp pytorch-develop-181/torch/csrc/utils/tensor_types.cpp
--- pytorch-v1.8.1/torch/csrc/utils/tensor_types.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/csrc/utils/tensor_types.cpp 2021-12-21 12:00:50.138944885 +0800
+=======
+++ pytorch-develop-181/torch/csrc/utils/tensor_types.cpp 2022-01-06 12:00:48.927596527 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+// Copyright (c) 2020 Huawei Technologies Co., Ltd
+// Copyright (c) 2019, Facebook CORPORATION.
@@ -44460,7 +44760,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
}
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/distributed/distributed_c10d.py pytorch-develop-181/torch/distributed/distributed_c10d.py
--- pytorch-v1.8.1/torch/distributed/distributed_c10d.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/distributed/distributed_c10d.py 2021-12-21 12:00:50.142944917 +0800
+=======
+++ pytorch-develop-181/torch/distributed/distributed_c10d.py 2022-01-06 12:00:48.927596527 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -44551,7 +44855,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
prefix_store,
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/__init__.py pytorch-develop-181/torch/__init__.py
--- pytorch-v1.8.1/torch/__init__.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/__init__.py 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/__init__.py 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -675,3 +675,11 @@
# class usage. We add these lines here to preserve backward compatibility.
quantized_lstm = torch.ops.aten.quantized_lstm
@@ -44567,7 +44875,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
\ No newline at end of file
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/lib/c10d/CMakeLists.txt pytorch-develop-181/torch/lib/c10d/CMakeLists.txt
--- pytorch-v1.8.1/torch/lib/c10d/CMakeLists.txt 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/lib/c10d/CMakeLists.txt 2021-12-21 12:00:50.146944948 +0800
+=======
+++ pytorch-develop-181/torch/lib/c10d/CMakeLists.txt 2022-01-06 12:00:48.935596583 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -27,6 +27,10 @@
option(USE_C10D_NCCL "USE C10D NCCL" ON)
endif()
@@ -44620,7 +44932,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
copy_header(ProcessGroupMPI.hpp)
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/lib/c10d/comm.cpp pytorch-develop-181/torch/lib/c10d/comm.cpp
--- pytorch-v1.8.1/torch/lib/c10d/comm.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/lib/c10d/comm.cpp 2021-12-21 12:00:50.150944980 +0800
+=======
+++ pytorch-develop-181/torch/lib/c10d/comm.cpp 2022-01-06 12:00:48.935596583 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -12,6 +12,26 @@
class BroadcastWork {
@@ -44709,7 +45025,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
while (!in_flight.empty()) {
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/lib/c10d/reducer.cpp pytorch-develop-181/torch/lib/c10d/reducer.cpp
--- pytorch-v1.8.1/torch/lib/c10d/reducer.cpp 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/lib/c10d/reducer.cpp 2021-12-21 12:00:50.150944980 +0800
+=======
+++ pytorch-develop-181/torch/lib/c10d/reducer.cpp 2022-01-06 12:00:48.939596610 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -18,6 +18,18 @@
namespace c10d {
namespace {
@@ -44901,7 +45221,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
// A bucket with one or more dense tensors needs to be unflattened.
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/lib/libshm/CMakeLists.txt pytorch-develop-181/torch/lib/libshm/CMakeLists.txt
--- pytorch-v1.8.1/torch/lib/libshm/CMakeLists.txt 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/lib/libshm/CMakeLists.txt 2021-12-21 12:00:50.150944980 +0800
+=======
+++ pytorch-develop-181/torch/lib/libshm/CMakeLists.txt 2022-01-06 12:00:48.939596610 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -41,8 +41,11 @@
set_target_properties(shm PROPERTIES
PREFIX "lib"
@@ -44917,7 +45241,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# https://github.com/libgit2/libgit2/issues/2128#issuecomment-35649830
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/nn/modules/batchnorm.py pytorch-develop-181/torch/nn/modules/batchnorm.py
--- pytorch-v1.8.1/torch/nn/modules/batchnorm.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/nn/modules/batchnorm.py 2021-12-21 12:00:50.154945012 +0800
+=======
+++ pytorch-develop-181/torch/nn/modules/batchnorm.py 2022-01-06 12:00:48.939596610 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,18 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -44939,7 +45267,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
from ._functions import SyncBatchNorm as sync_batch_norm
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/nn/modules/module.py pytorch-develop-181/torch/nn/modules/module.py
--- pytorch-v1.8.1/torch/nn/modules/module.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/nn/modules/module.py 2021-12-21 12:00:50.154945012 +0800
+=======
+++ pytorch-develop-181/torch/nn/modules/module.py 2022-01-06 12:00:48.939596610 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -45065,7 +45397,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
if convert_to_format is not None and t.dim() == 4:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/nn/modules/normalization.py pytorch-develop-181/torch/nn/modules/normalization.py
--- pytorch-v1.8.1/torch/nn/modules/normalization.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/nn/modules/normalization.py 2021-12-21 12:00:50.154945012 +0800
+=======
+++ pytorch-develop-181/torch/nn/modules/normalization.py 2022-01-06 12:00:48.939596610 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -167,8 +167,11 @@
init.zeros_(self.bias)
@@ -45082,7 +45418,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
return '{normalized_shape}, eps={eps}, ' \
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/nn/parallel/distributed.py pytorch-develop-181/torch/nn/parallel/distributed.py
--- pytorch-v1.8.1/torch/nn/parallel/distributed.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/nn/parallel/distributed.py 2021-12-21 12:00:50.154945012 +0800
+=======
+++ pytorch-develop-181/torch/nn/parallel/distributed.py 2022-01-06 12:00:48.943596638 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -45114,7 +45454,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
output = self.module(*inputs[0], **kwargs[0])
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/serialization.py pytorch-develop-181/torch/serialization.py
--- pytorch-v1.8.1/torch/serialization.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/serialization.py 2021-12-21 12:00:50.162945075 +0800
+=======
+++ pytorch-develop-181/torch/serialization.py 2022-01-06 12:00:48.947596665 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -45203,7 +45547,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
See also: `saving-loading-tensors`
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/storage.py pytorch-develop-181/torch/storage.py
--- pytorch-v1.8.1/torch/storage.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/storage.py 2021-12-21 12:00:50.162945075 +0800
+=======
+++ pytorch-develop-181/torch/storage.py 2022-01-06 12:00:48.947596665 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -8,6 +8,7 @@
class _StorageBase(object):
_cdata: Any
@@ -45223,7 +45571,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
else:
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/tensor.py pytorch-develop-181/torch/tensor.py
--- pytorch-v1.8.1/torch/tensor.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/tensor.py 2021-12-21 12:00:50.162945075 +0800
+=======
+++ pytorch-develop-181/torch/tensor.py 2022-01-06 12:00:48.947596665 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,18 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -45285,7 +45637,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
def __reversed__(self):
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/_tensor_str.py pytorch-develop-181/torch/_tensor_str.py
--- pytorch-v1.8.1/torch/_tensor_str.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/_tensor_str.py 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/_tensor_str.py 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -45329,7 +45685,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# TODO: add an API to map real -> complex dtypes
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/utils/data/dataloader.py pytorch-develop-181/torch/utils/data/dataloader.py
--- pytorch-v1.8.1/torch/utils/data/dataloader.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/utils/data/dataloader.py 2021-12-21 12:00:50.166945107 +0800
+=======
+++ pytorch-develop-181/torch/utils/data/dataloader.py 2022-01-06 12:00:48.955596720 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -45390,7 +45750,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
pin_memory_thread.start()
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/utils/data/_utils/pin_memory.py pytorch-develop-181/torch/utils/data/_utils/pin_memory.py
--- pytorch-v1.8.1/torch/utils/data/_utils/pin_memory.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/utils/data/_utils/pin_memory.py 2021-12-21 12:00:46.274914276 +0800
+=======
+++ pytorch-develop-181/torch/utils/data/_utils/pin_memory.py 2022-01-06 12:00:45.055569814 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
@@ -45436,7 +45800,11 @@ diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=
# logic of this function.
diff -Nur '--exclude=.git*' '--exclude=.jenkins' '--exclude=android' '--exclude=OWNERS' '--exclude=third_party' '--exclude=README*' -Nur pytorch-v1.8.1/torch/_utils.py pytorch-develop-181/torch/_utils.py
--- pytorch-v1.8.1/torch/_utils.py 2021-03-24 10:28:21.000000000 +0800
+<<<<<<< HEAD
++++ pytorch-develop-181/torch/_utils.py 2021-12-21 12:00:50.098944568 +0800
+=======
+++ pytorch-develop-181/torch/_utils.py 2022-01-06 12:00:48.887596251 +0800
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
@@ -1,3 +1,19 @@
+# Copyright (c) 2020 Huawei Technologies Co., Ltd
+# Copyright (c) 2019, Facebook CORPORATION.
diff --git a/pytorch1.5.0/src/aten/src/ATen/native/native_functions.yaml b/pytorch1.5.0/src/aten/src/ATen/native/native_functions.yaml
index 927c0005f734957d6a6f29684ff32adfb7867b0f..f1a7ffbf494f5e6eec9e7fda57b657b571f82493 100644
--- a/pytorch1.5.0/src/aten/src/ATen/native/native_functions.yaml
+++ b/pytorch1.5.0/src/aten/src/ATen/native/native_functions.yaml
@@ -8728,6 +8728,11 @@
npu_dispatch_only:
NPU: rotated_overlaps_npu
+<<<<<<< HEAD
+- func: npu_rotated_iou(Tensor self, Tensor query_boxes, bool trans=False, int mode=0, bool is_cross=True) -> Tensor
+ npu_dispatch_only:
+ NPU: rotated_iou_npu
+=======
- func: npu_rotated_iou(Tensor self, Tensor query_boxes, bool trans=False, int mode=0, bool is_cross=True, float v_threshold=0.0, float e_threshold=0.0) -> Tensor
npu_dispatch_only:
NPU: rotated_iou_npu
@@ -8735,3 +8740,4 @@
- func: npu_hcom_allreduce.out(Tensor self, str reduction, str group, int fusion, int fusion_id, float alpha, float beta, Tensor(a!) out) -> Tensor(a!)
npu_dispatch_only:
NPU: hcom_allreduce_npu
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
diff --git a/pytorch1.5.0/src/aten/src/ATen/native/npu/RotatedIouKernelNpu.cpp b/pytorch1.5.0/src/aten/src/ATen/native/npu/RotatedIouKernelNpu.cpp
index 37df5629c198a825f9ce40d7a64ce96437bb55b7..57c5a733518ae196785f9ecd7ce6d0e0158a56be 100644
--- a/pytorch1.5.0/src/aten/src/ATen/native/npu/RotatedIouKernelNpu.cpp
+++ b/pytorch1.5.0/src/aten/src/ATen/native/npu/RotatedIouKernelNpu.cpp
@@ -26,9 +26,13 @@ Tensor& rotated_iou_npu_nocheck(
const Tensor& query_boxes,
bool trans,
int64_t mode,
+<<<<<<< HEAD
+ bool is_cross) {
+=======
bool is_cross,
double v_threshold,
double e_threshold) {
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
string mode_str = (mode == 0) ? "iou" : "iof";
OpCommand cmd;
@@ -37,10 +41,15 @@ Tensor& rotated_iou_npu_nocheck(
.Input(query_boxes)
.Output(iou)
.Attr("trans", trans)
+<<<<<<< HEAD
+ .Attr("mode_str", mode_str)
+ .Attr("is_cross", is_cross)
+=======
.Attr("mode", mode_str)
.Attr("is_cross", is_cross)
.Attr("value", static_cast(v_threshold))
.Attr("value", static_cast(e_threshold))
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
.Run();
return iou;
}
@@ -50,30 +59,51 @@ Tensor rotated_iou_npu(
const Tensor& query_boxes,
bool trans,
int64_t mode,
+<<<<<<< HEAD
+ bool is_cross) {
+=======
bool is_cross,
double v_threshold,
double e_threshold) {
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
TORCH_CHECK(boxes.ndimension() == 3 && query_boxes.ndimension() == 3);
auto origin_dtype = boxes.scalar_type();
Tensor boxesOk = boxes.permute({0, 2, 1});
if (boxesOk.scalar_type() == at::kHalf){
+<<<<<<< HEAD
+ Tensor boxesOk = boxesOk.npu_dtype_cast(at::kFloat).permute({0, 2, 1});
+ }
+ Tensor queryBoxesOk = query_boxes.permute({0, 2, 1});
+ if (queryBoxesOk.scalar_type() == at::kHalf){
+ Tensor queryBoxes = queryBoxesOk.npu_dtype_cast(at::kFloat).permute({0, 2, 1});
+=======
boxesOk = boxesOk.npu_dtype_cast(at::kFloat);
}
Tensor query_boxesOk = query_boxes.permute({0, 2, 1});
if (query_boxesOk.scalar_type() == at::kHalf){
query_boxesOk = query_boxesOk.npu_dtype_cast(at::kFloat);
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
}
int64_t B = boxesOk.size(0);
int64_t N = boxesOk.size(-1);
+<<<<<<< HEAD
+ int64_t K = queryBoxesOk.size(-1);
+
+ SmallVector output_size({B, N, K});
+ Tensor iou = OpPreparation::ApplyTensor(boxesOk, output_size);
+
+ rotated_iou_npu_nocheck(iou, boxesOk, queryBoxesOk, trans, mode, is_cross);
+=======
int64_t K = query_boxesOk.size(-1);
SmallVector output_size({B, N, K});
Tensor iou = OpPreparation::ApplyTensor(boxesOk, output_size);
rotated_iou_npu_nocheck(iou, boxesOk, query_boxesOk, trans, mode, is_cross, v_threshold, e_threshold);
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
iou = iou.npu_dtype_cast(origin_dtype);
return iou;
}
diff --git a/pytorch1.5.0/src/aten/src/ATen/native/npu/frame/OpParamMaker.cpp b/pytorch1.5.0/src/aten/src/ATen/native/npu/frame/OpParamMaker.cpp
index d1e6d3977e6d7f93ee2e3a55241b4d285bd8ebce..95d3e306255c8752fb18500fb37d8056b6b6b8ef 100644
--- a/pytorch1.5.0/src/aten/src/ATen/native/npu/frame/OpParamMaker.cpp
+++ b/pytorch1.5.0/src/aten/src/ATen/native/npu/frame/OpParamMaker.cpp
@@ -308,7 +308,10 @@ int RecordEventFunc(QueueParas* in, aclrtStream stream) {
int WaitEventFunc(QueueParas* in, aclrtStream stream) {
auto cur_paras = static_cast(in->paramVal);
+<<<<<<< HEAD
+=======
RECORD_HOST_FUNCTION("aclrtStreamWaitEvent", std::vector({}));
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
aclError ret = aclrtStreamWaitEvent(stream, cur_paras->event);
if (ret != ACL_ERROR_NONE) {
C10_NPU_SHOW_ERR_MSG();
@@ -318,7 +321,10 @@ int WaitEventFunc(QueueParas* in, aclrtStream stream) {
int LazyDestroyEventFunc(QueueParas* in, aclrtStream stream) {
auto cur_paras = static_cast(in->paramVal);
+<<<<<<< HEAD
+=======
RECORD_HOST_FUNCTION("LazyDestroyEventFunc", std::vector({}));
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
aclError ret = c10::npu::NPUEventManager::GetInstance().LazyDestroy(cur_paras->event);
if (ret != ACL_ERROR_NONE) {
C10_NPU_SHOW_ERR_MSG();
diff --git a/pytorch1.5.0/src/aten/src/ATen/native/npu/normalization/BatchNormBackwardReduceKernelNpu.cpp b/pytorch1.5.0/src/aten/src/ATen/native/npu/normalization/BatchNormBackwardReduceKernelNpu.cpp
index 08cc858464447c03d33d5d41567c2a6d8e3aa6e4..0fd1ba9bb0f2287072c6e5c3e875f5c9d8c35af2 100644
--- a/pytorch1.5.0/src/aten/src/ATen/native/npu/normalization/BatchNormBackwardReduceKernelNpu.cpp
+++ b/pytorch1.5.0/src/aten/src/ATen/native/npu/normalization/BatchNormBackwardReduceKernelNpu.cpp
@@ -74,12 +74,16 @@ std::tuple batch_norm_backward_reduce_npu_im
if (input_g){
sum_dy_xmu.copy_(sum_dy_xmu_out);
sum_dy.copy_(sum_dy_);
+ sum_dy = sum_dy.scalar_type() == origin_dtype ? sum_dy : sum_dy.npu_dtype_cast(origin_dtype);
+ sum_dy_xmu = sum_dy_xmu.scalar_type() == origin_dtype ? sum_dy_xmu : sum_dy_xmu.npu_dtype_cast(origin_dtype);
}
if (weight_g) {
grad_weight.copy_(grad_weight_res);
+ grad_weight = grad_weight.scalar_type() == origin_dtype ? grad_weight : grad_weight.npu_dtype_cast(origin_dtype);
}
if (bias_g) {
grad_bias.copy_(grad_bias_);
+ grad_bias = grad_bias.scalar_type() == origin_dtype ? grad_bias : grad_bias.npu_dtype_cast(origin_dtype);
}
return std::tie(sum_dy, sum_dy_xmu, grad_weight, grad_bias);
diff --git a/pytorch1.5.0/src/aten/src/ATen/native/npu/normalization/BatchNormGatherStatsWithCountsKernelNpu.cpp b/pytorch1.5.0/src/aten/src/ATen/native/npu/normalization/BatchNormGatherStatsWithCountsKernelNpu.cpp
index 21464ba4dc24b40600a344a52c87bf60aa8da28c..3d642e7bf464ef595ca7bced06202160c13edd5f 100644
--- a/pytorch1.5.0/src/aten/src/ATen/native/npu/normalization/BatchNormGatherStatsWithCountsKernelNpu.cpp
+++ b/pytorch1.5.0/src/aten/src/ATen/native/npu/normalization/BatchNormGatherStatsWithCountsKernelNpu.cpp
@@ -34,6 +34,10 @@ std::tuple batch_norm_gather_stats_with_counts_npu_impl(
auto options = self.options();
auto dimC = self.size(1);
+<<<<<<< HEAD
+ Tensor running_mean_ = running_mean.defined() ? running_mean.unsqueeze(0) : zeros_npu({1, dimC}, options);
+ Tensor running_var_ = running_var.defined() ? running_var.unsqueeze(0) : ones_npu({1, dimC}, options);
+=======
Tensor meanCp = mean.npu_dtype_cast(at::kFloat);
Tensor invstdCp = invstd.npu_dtype_cast(at::kFloat);
@@ -43,6 +47,7 @@ std::tuple batch_norm_gather_stats_with_counts_npu_impl(
zeros_npu({1, dimC}, options)).npu_format_cast(ACL_FORMAT_ND).npu_dtype_cast(at::kFloat);
Tensor running_var_ = (running_var.defined() ? running_var.unsqueeze(0) :
ones_npu({1, dimC}, options)).npu_format_cast(ACL_FORMAT_ND).npu_dtype_cast(at::kFloat);
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
IntArrayRef axes({0});
Tensor countsTensor;
// create countsTensor
@@ -50,12 +55,20 @@ std::tuple batch_norm_gather_stats_with_counts_npu_impl(
SmallVector countList = array_to_small_vector(counts);
auto cpuTensor = at::empty(countList.size(), TensorOptions(kCPU).dtype(at::kLong));
std::memcpy(cpuTensor.data_ptr(), (void*)countList.data(), sizeof(int64_t) * cpuTensor.numel());
+<<<<<<< HEAD
+ countsTensor = cpuTensor.to(at::kNPU).npu_dtype_cast(mean.scalar_type());
+=======
countsTensor = cpuTensor.to(at::kNPU).npu_dtype_cast(meanCp.scalar_type());
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
}
Tensor countsTensorT = transpose_npu(countsTensor.unsqueeze(-1), {0, 1});
Tensor countsTensorBroadcast = npu_broadcast(countsTensorT, invstd.sizes());
+<<<<<<< HEAD
+ Tensor countsAllSum = OpPreparation::ApplyTensorWithSizes({1, dimC}, mean.options());
+=======
Tensor countsAllSum = OpPreparation::ApplyTensorWithSizes({1, dimC}, meanCp.options());
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
OpCommand cmd1;
cmd1.Name("ReduceSum")
.Input(countsTensorBroadcast)
@@ -67,7 +80,11 @@ std::tuple batch_norm_gather_stats_with_counts_npu_impl(
Tensor countsAllSumBroadcast = countsAllSum.expand(countsTensorBroadcast.sizes());
OpCommand cmd2;
cmd2.Name("ReduceMeanWithCount")
+<<<<<<< HEAD
+ .Input(mean)
+=======
.Input(meanCp)
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
.Input(countsTensorBroadcast)
.Input(countsAllSumBroadcast)
.Output(mean_all)
@@ -78,8 +95,13 @@ std::tuple batch_norm_gather_stats_with_counts_npu_impl(
Tensor meanBroadcast = mean_all.expand(mean.sizes());
OpCommand cmd3;
cmd3.Name("SyncBatchNormGatherStatsWithCounts")
+<<<<<<< HEAD
+ .Input(mean)
+ .Input(invstd)
+=======
.Input(meanCp)
.Input(invstdCp)
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
.Input(countsTensorBroadcast)
.Input(meanBroadcast)
.Input(countsAllSum)
@@ -98,11 +120,14 @@ std::tuple batch_norm_gather_stats_with_counts_npu_impl(
.Output(running_mean_)
.Attr("momentum", static_cast(momentum))
.Run();
+<<<<<<< HEAD
+=======
// running_mean almost apply is the same as running_var
if (running_mean_.scalar_type() != running_mean_dtype) {
running_mean_ = running_mean_.npu_dtype_cast(running_mean_dtype);
running_var_ = running_var_.npu_dtype_cast(running_mean_dtype);
}
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
running_mean.copy_(running_mean_.squeeze(0));
running_var.copy_(running_var_.squeeze(0));
}
@@ -119,6 +144,14 @@ std::tuple batch_norm_gather_stats_with_counts_npu(
double momentum,
double eps,
IntArrayRef counts) {
+<<<<<<< HEAD
+ Tensor mean_all = OpPreparation::ApplyTensor(self, {1, self.size(1)});
+ Tensor invstd_all = OpPreparation::ApplyTensor(self, {1, self.size(1)});
+ batch_norm_gather_stats_with_counts_npu_impl(mean_all, invstd_all, self,
+ mean, invstd, running_mean, running_var,
+ momentum, eps, counts);
+
+=======
bool isFullyFp16 = false;
if (self.scalar_type() == mean.scalar_type() && self.scalar_type() == at::kHalf) {
isFullyFp16 = true;
@@ -135,6 +168,7 @@ std::tuple batch_norm_gather_stats_with_counts_npu(
mean_all = mean_all.npu_dtype_cast(at::kHalf);
invstd_all = invstd_all.npu_dtype_cast(at::kHalf);
}
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
return std::make_tuple(mean_all.squeeze(0), invstd_all.squeeze(0));
}
diff --git a/pytorch1.5.0/test/test_npu/graph_utils.py b/pytorch1.5.0/test/test_npu/graph_utils.py
index f01c10588e6d9078564fb1457666cb12a60f8bc9..c29e74410e7d2e4fd2976afc4932657508419293 100644
--- a/pytorch1.5.0/test/test_npu/graph_utils.py
+++ b/pytorch1.5.0/test/test_npu/graph_utils.py
@@ -1,3 +1,16 @@
+<<<<<<< HEAD
+import torch
+
+def graph_mode(func):
+ print("graph mode on")
+ def wrapper(*args, **kw):
+ print("runing: ", func.__name__)
+ torch.npu.enable_graph_mode()
+ func(*args, **kw)
+ print("graph mode off")
+ torch.npu.disable_graph_mode()
+ return wrapper
+=======
# Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
@@ -19,3 +32,4 @@ common_path = os.path.dirname(os.path.realpath(__file__)) + "/common/"
if common_path not in sys.path:
sys.path.append(common_path)
from graph_utils_new import graph_mode
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
diff --git a/pytorch1.5.0/test/test_npu/test_network_ops/test_batchnorm_gatherstats_withcounts.py b/pytorch1.5.0/test/test_npu/test_network_ops/test_batchnorm_gatherstats_withcounts.py
index ac8a1d6b2220e3d6d20a6b53182009aa8c50aefe..629d0742272ba0a5154ecf30c91fbf36e15bd077 100644
--- a/pytorch1.5.0/test/test_npu/test_network_ops/test_batchnorm_gatherstats_withcounts.py
+++ b/pytorch1.5.0/test/test_npu/test_network_ops/test_batchnorm_gatherstats_withcounts.py
@@ -40,22 +40,43 @@ class TestBatchNormGatherStatsWithCounts(TestCase):
def test_batch_norm_gather_stats_with_counts(self, device):
shape_format = [
+<<<<<<< HEAD
+ [[np.float32, -1, [2, 3, 12, 12]], [np.float32, -1, [4, 3]], [np.float32, -1, [4, 3]], \
+=======
[[np.float16, -1, [2, 3, 12, 12]], [np.float32, -1, [4, 3]], [np.float32, -1, [4, 3]], \
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
[np.float32, -1, [3]], [np.float32, -1, [3]], 1e-3, 1e-5, [4, 5, 6, 4]],
[[np.float16, -1, [16, 3, 12, 12]], [np.float16, -1, [4, 3]], [np.float16, -1, [4, 3]], \
[np.float16, -1, [3]], [np.float16, -1, [3]], 1e-2, 1e-4, [4, 5, 3, 2]],
]
for item in shape_format:
assert len(item[-1]) == item[1][-1][0]
+<<<<<<< HEAD
+ cpu_input1, npu_input1 = create_common_tensor(item[0], 1, 10)
+=======
# NB: mixup precision ut, benchmarking with fp32 standard
cpu_input1, npu_input1fp16 = create_common_tensor(item[0], 1, 10)
# fp32 standard and mixup precision demand only
if item[1][0] == np.float32:
npu_input1fp32 = npu_input1fp16.float()
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
cpu_mean, npu_mean = create_common_tensor(item[1], 0, 1)
cpu_invstd, npu_invstd = create_common_tensor(item[2], 0, 1)
cpu_running_mean, npu_running_mean = create_common_tensor(item[3], 0, 1)
cpu_running_invstd, npu_running_invstd = create_common_tensor(item[4], 0, 1)
+<<<<<<< HEAD
+ npu_output = self.npu_op_exec(npu_input1, npu_mean, npu_invstd, npu_running_mean, npu_running_invstd, item[-3], item[-2], item[-1])
+
+ if item[0][0] == np.float16:
+ cuda_output = self.expect_cuda_out_fp16()
+ else:
+ cuda_output = self.expect_cuda_out_fp32()
+ self.assertRtolEqual(npu_output[0], cuda_output[0])
+ self.assertRtolEqual(npu_output[1], cuda_output[1])
+ self.assertRtolEqual(npu_running_mean.cpu().numpy(), cuda_output[2])
+ self.assertRtolEqual(npu_running_invstd.cpu().numpy(), cuda_output[3])
+
+=======
if item[1][0] == np.float16:
cuda_output = self.expect_cuda_out_fp16()
@@ -75,6 +96,7 @@ class TestBatchNormGatherStatsWithCounts(TestCase):
# note: here not valid running_mean, because of compute again will cause result error!
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
instantiate_device_type_tests(TestBatchNormGatherStatsWithCounts, globals(), except_for='cpu')
if __name__ == "__main__":
# NB: Op support static && dynamic, but static is more faster, so use static ut here!
diff --git a/pytorch1.5.0/test/test_npu/test_network_ops/test_rotated_iou.py b/pytorch1.5.0/test/test_npu/test_network_ops/test_rotated_iou.py
index 57725dff066da3f0d74b96bf5d06c18e93de365f..b50e228071eff6e452ee3d05b98bbd9db2c38dd7 100644
--- a/pytorch1.5.0/test/test_npu/test_network_ops/test_rotated_iou.py
+++ b/pytorch1.5.0/test/test_npu/test_network_ops/test_rotated_iou.py
@@ -1,3 +1,5 @@
+<<<<<<< HEAD
+=======
# Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
@@ -14,13 +16,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
import math
import sys
import torch
import numpy as np
from common_utils import TestCase, run_tests
from common_device_type import dtypes, instantiate_device_type_tests
+<<<<<<< HEAD
+
+=======
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
class TestRotatedIou(TestCase):
def generate_rto_data(self, item):
minValue, maxValue = 20, 60
@@ -60,7 +67,11 @@ class TestRotatedIou(TestCase):
return output
def npu_op_exec(self, box1, box2, trans=False):
+<<<<<<< HEAD
+ output = torch.npu_rotated_iou(box1, box2, trans, 0, True)
+=======
output = torch.npu_rotated_iou(box1, box2, trans, 0, True, 0.0, 0.0)
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
output = output.detach().cpu().numpy()
return output
@@ -81,4 +92,8 @@ class TestRotatedIou(TestCase):
self.assertRtolEqual(cpu_output, npu_output)
instantiate_device_type_tests(TestRotatedIou, globals(), except_for="cpu")
if __name__ == "__main__":
- run_tests()
\ No newline at end of file
+<<<<<<< HEAD
+ run_tests()
+=======
+ run_tests()
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
diff --git a/pytorch1.5.0/test/test_npu/test_npu_tools/test_npu_profiler.py b/pytorch1.5.0/test/test_npu/test_npu_tools/test_npu_profiler.py
index 7dc5a9a9b1d4d5d0ef415129c0b952afca3dcc41..e3033b9e2f1d675a3bd9622bc2315f95a8eeb8eb 100644
--- a/pytorch1.5.0/test/test_npu/test_npu_tools/test_npu_profiler.py
+++ b/pytorch1.5.0/test/test_npu/test_npu_tools/test_npu_profiler.py
@@ -170,12 +170,20 @@ class TestE2EProfiler(TestCase):
self._run_small_model()
def test_with_ops(self):
+<<<<<<< HEAD
+ for events in TestCannProfiler.enevtTypeResults:
+=======
for events in TestE2EProfiler.enevtTypeResults:
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
for i in range(5):
self._test_e2e_ops(**events, aiCoreMetricsType=i)
def test_with_small_model(self):
+<<<<<<< HEAD
+ for events in TestCannProfiler.enevtTypeResults:
+=======
for events in TestE2EProfiler.enevtTypeResults:
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080
for i in range(5):
self._test_e2e_model(**events, aiCoreMetricsType=i)
diff --git a/pytorch1.5.0/test/test_npu/util_test.py b/pytorch1.5.0/test/test_npu/util_test.py
index 9877ef7764d9e90f7b7fa313b7b339ead6c4c2cb..e8b6cf14e060de4401c3f9a2637b84815cb91203 100644
--- a/pytorch1.5.0/test/test_npu/util_test.py
+++ b/pytorch1.5.0/test/test_npu/util_test.py
@@ -21,3 +21,68 @@ if common_path not in sys.path:
from util_test_new import create_common_tensor, test_2args_broadcast,\
create_dtype_tensor, create_common_tensor_for_broadcast
+<<<<<<< HEAD
+import torch
+import numpy as np
+
+# format value description:
+# -1 :FORMAT_UNDEFINED
+# 0 :FORMAT_NCHW
+# 1 :FORMAT_NHWC
+# 2 :FORMAT_ND
+# 3 :FORMAT_NC1HWC0
+# 4 :FORMAT_FRACTAL_Z
+# 29 :FORMAT_FRACTAL_NZ
+def create_common_tensor(item, minValue, maxValue):
+ dtype = item[0]
+ format_tensor = item[1]
+ shape = item[2]
+ input1 = np.random.uniform(minValue, maxValue, shape).astype(dtype)
+ cpu_input = torch.from_numpy(input1)
+ npu_input = torch.from_numpy(input1).to("npu")
+ if format_tensor != -1:
+ npu_input = npu_input.npu_format_cast(format_tensor)
+ return cpu_input, npu_input
+
+
+threshold = 1.e-4
+threshold2 = 1.e-3
+
+
+def compare_res_new(cpu_output, npu_output, testcase_name):
+ if cpu_output.shape != npu_output.shape:
+ return print("result shape error!", cpu_output.shape, npu_output.shape)
+ if cpu_output.dtype != npu_output.dtype:
+ return print("result dtype error!", cpu_output.dtype, npu_output.dtype)
+ if cpu_output.dtype == np.int32:
+ result = np.equal(cpu_output, npu_output)
+ if result is False:
+ return print('testcase_name={0}, npu datatype={1} shape={2} fails!'.format(
+ testcase_name, npu_output.dtype, npu_output.shape))
+ elif cpu_output.dtype == np.float16:
+ result = np.allclose(npu_output, cpu_output, threshold)
+ if result is False:
+ return print('testcase_name={0}, npu datatype={1} shape={2} fails!'.format(
+ testcase_name, npu_output.dtype, npu_output.shape))
+ elif cpu_output.dtype == np.float32:
+ result = np.allclose(npu_output, cpu_output, 0, 0.0001)
+ print(npu_output, cpu_output)
+ print(result)
+ if not result:
+ return print('testcase_name={0}, npu datatype={1} shape={2} fails!'.format(
+ testcase_name, npu_output.dtype, npu_output.shape))
+ print('testcase_name={0}, datatype={1} shape={2} pass!'.format(testcase_name,cpu_output.dtype, cpu_output.shape))
+
+
+def create_common_tensor_for_broadcast(item, minValue, maxValue):
+ dtype = item[0]
+ npu_format = item[1]
+ shape = item[2]
+ input1 = np.random.uniform(minValue, maxValue, shape[0]).astype(dtype)
+ cpu_input = torch.from_numpy(input1)
+ npu_input = torch.from_numpy(input1).to("npu")
+ if npu_format != -1:
+ npu_input = npu_input.npu_format_cast(npu_format)
+ return cpu_input, npu_input
+=======
+>>>>>>> f99e45f95146342542aac848d7fc729967ae3080