forked from huawei/mindspore2022
fix codedex error
This commit is contained in:
parent
e99d814933
commit
b0cd3a735a
|
|
@ -173,9 +173,7 @@ FuncGraphPtr PrimBpOptPassStep2(const opt::irpass::OptimizeIRPassLib &irpass, co
|
|||
FuncGraphPtr BpropGraphFinalOptPass(const ResourcePtr &res) {
|
||||
MS_EXCEPTION_IF_NULL(res);
|
||||
MS_EXCEPTION_IF_NULL(res->func_graph());
|
||||
if (!TransformTopGraphPass(res)) {
|
||||
MS_LOG(EXCEPTION) << "Run TransformTopGraphPass failed";
|
||||
}
|
||||
(void)TransformTopGraphPass(res);
|
||||
|
||||
opt::irpass::OptimizeIRPassLib irpass;
|
||||
opt::OptPassConfig bg_final_opt = opt::OptPassConfig({
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ bool BaseRefToInt(const ValuePtr &v, int64_t *value) {
|
|||
MS_EXCEPTION_IF_NULL(v);
|
||||
if (v->isa<tensor::Tensor>()) {
|
||||
auto tensor = v->cast<tensor::TensorPtr>();
|
||||
(void)tensor->data_sync();
|
||||
tensor->data_sync();
|
||||
if (tensor->Dtype()->ToString() == "Int32") {
|
||||
auto *tensor_data = static_cast<int32_t *>(tensor->data_c());
|
||||
auto vb = tensor_data[0];
|
||||
|
|
|
|||
Loading…
Reference in New Issue