!43410 fix codedex and pylint
Merge pull request !43410 from zhangbuxue/fix_codedex_r1.9
This commit is contained in:
commit
aedf225320
|
@ -85,7 +85,7 @@ int RandomShuffleCpuKernelMod::Resize(const BaseOperatorPtr &base_operator, cons
|
|||
template <typename T>
|
||||
bool RandomShuffleCpuKernelMod::ScalarShuffle(const std::vector<kernel::AddressPtr> &inputs,
|
||||
const std::vector<kernel::AddressPtr> &outputs,
|
||||
const std::vector<size_t> &perm) {
|
||||
const std::vector<size_t> &perm) const {
|
||||
auto input = reinterpret_cast<T *>(inputs[0]->addr);
|
||||
auto output = reinterpret_cast<T *>(outputs[0]->addr);
|
||||
for (size_t i = 0; i < perm.size(); i++) {
|
||||
|
|
|
@ -49,7 +49,7 @@ class RandomShuffleCpuKernelMod : public NativeCpuKernelMod {
|
|||
|
||||
template <typename T>
|
||||
bool ScalarShuffle(const std::vector<kernel::AddressPtr> &inputs, const std::vector<kernel::AddressPtr> &outputs,
|
||||
const std::vector<size_t> &perm);
|
||||
const std::vector<size_t> &perm) const;
|
||||
|
||||
template <typename T>
|
||||
bool ScalarShuffleWithBatchRank(const std::vector<kernel::AddressPtr> &inputs,
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <map>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <complex>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# ============================================================================
|
||||
|
||||
"""utils for operator"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from mindspore.common.tensor import Tensor
|
||||
from mindspore._checkparam import Validator as validator
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# ============================================================================
|
||||
|
||||
"""Operators for function."""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import mindspore.common.dtype as mstype
|
||||
from mindspore.ops import operations as P
|
||||
|
|
|
@ -20,6 +20,8 @@ from .._primitive_cache import _get_cache_prim
|
|||
|
||||
|
||||
assign_ = P.Assign()
|
||||
|
||||
|
||||
def assign(variable, value):
|
||||
"""
|
||||
Assigns `Parameter` with a value.
|
||||
|
@ -56,6 +58,8 @@ def assign(variable, value):
|
|||
|
||||
|
||||
assign_sub_ = P.AssignSub()
|
||||
|
||||
|
||||
def assign_sub(variable, value):
|
||||
"""
|
||||
Updates a `Parameter` by subtracting a value from it.
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# ============================================================================
|
||||
|
||||
"""Operators for quantization."""
|
||||
from __future__ import absolute_import
|
||||
from functools import partial
|
||||
|
||||
import mindspore.context as context
|
||||
|
|
|
@ -54,8 +54,6 @@ class BaseTimelineGenerator:
|
|||
|
||||
_STEPS_SORT_INDEX = -4
|
||||
|
||||
__col_names__ = ['op_name', 'stream_id', 'start_time', 'duration']
|
||||
|
||||
_output_timeline_data_file_path = 'output_timeline_data_{}.txt'
|
||||
_timeline_meta = []
|
||||
_format_meta_data_list = []
|
||||
|
@ -90,6 +88,8 @@ class BaseTimelineGenerator:
|
|||
_device_target = DeviceTarget.ASCEND.value
|
||||
_model = context.GRAPH_MODE
|
||||
|
||||
__col_names__ = ['op_name', 'stream_id', 'start_time', 'duration']
|
||||
|
||||
def __init__(self, device_target, model):
|
||||
self._tid_dict = {
|
||||
"computation_op": (self._MERGED_COMPUTATION_TID, self._OP_OVERLAP_PID),
|
||||
|
|
Loading…
Reference in New Issue