| @@ -14,7 +14,6 @@ | |||||
| * limitations under the License. | * limitations under the License. | ||||
| */ | */ | ||||
| #include "host_cpu_engine.h" | #include "host_cpu_engine.h" | ||||
| #include <dlfcn.h> | |||||
| #include "graph/common/omg_util.h" | #include "graph/common/omg_util.h" | ||||
| #include "graph/utils/op_desc_utils.h" | #include "graph/utils/op_desc_utils.h" | ||||
| #include "graph/utils/tensor_adapter.h" | #include "graph/utils/tensor_adapter.h" | ||||
| @@ -106,7 +106,7 @@ Status HostMemManager::QueryVarMemInfo(const string &op_name, uint64_t &base_add | |||||
| GELOGE(INTERNAL_ERROR, "Find host base base_addr failed,node name:%s!", op_name.c_str()); | GELOGE(INTERNAL_ERROR, "Find host base base_addr failed,node name:%s!", op_name.c_str()); | ||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| base_addr = reinterpret_cast<uint64_t>(reinterpret_cast<uintptr_t>(var_memory_base_map_[op_name].device_address)); | |||||
| base_addr = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(var_memory_base_map_[op_name].device_address)); | |||||
| data_size = var_memory_base_map_[op_name].mem_size; | data_size = var_memory_base_map_[op_name].mem_size; | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| @@ -180,7 +180,7 @@ Status SsdPriorboxKernel::SetVariance(const vector<float> &variance, const int d | |||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| Status SsdPriorboxKernel::GetNumPriorAndDimSize(uint aspect_ratios_size, uint min_sizes_size, uint max_sizes_size, | |||||
| Status SsdPriorboxKernel::GetNumPriorAndDimSize(uint32_t aspect_ratios_size, uint32_t min_sizes_size, uint32_t max_sizes_size, | |||||
| int layer_width, int layer_height, int &num_priors, | int layer_width, int layer_height, int &num_priors, | ||||
| int &dim_size) const { | int &dim_size) const { | ||||
| if (ge::CheckUint32MulOverflow(min_sizes_size, aspect_ratios_size) != SUCCESS) { | if (ge::CheckUint32MulOverflow(min_sizes_size, aspect_ratios_size) != SUCCESS) { | ||||
| @@ -100,7 +100,7 @@ class SsdPriorboxKernel : public Kernel { | |||||
| * @return OTHERS: Execution failed | * @return OTHERS: Execution failed | ||||
| * @author | * @author | ||||
| */ | */ | ||||
| Status GetNumPriorAndDimSize(uint aspect_ratios_size, uint min_sizes_size, uint max_sizes_size, int layer_width, | |||||
| Status GetNumPriorAndDimSize(uint32_t aspect_ratios_size, uint32_t min_sizes_size, uint32_t max_sizes_size, int layer_width, | |||||
| int layer_height, int &num_priors, int &dim_size) const; | int layer_height, int &num_priors, int &dim_size) const; | ||||
| void DataCalulate(float x, float y, float box_x, float box_y, int img_x, int img_y, vector<float> &result); | void DataCalulate(float x, float y, float box_x, float box_y, int img_x, int img_y, vector<float> &result); | ||||
| std::unique_ptr<float[]> BoundaryCalulate(int dim_size, int layer_width, int layer_height, float step_width, | std::unique_ptr<float[]> BoundaryCalulate(int dim_size, int layer_width, int layer_height, float step_width, | ||||
| @@ -33,7 +33,7 @@ class HybridProfiler { | |||||
| SHAPE_INFERENCE, | SHAPE_INFERENCE, | ||||
| COMPILE, | COMPILE, | ||||
| EXECUTION, | EXECUTION, | ||||
| CALLBACK, | |||||
| CALLBACK | |||||
| }; | }; | ||||
| struct Event { | struct Event { | ||||
| @@ -793,7 +793,7 @@ Status HybridModelBuilder::HandleDtString(const GeTensor &tensor, void *var_addr | |||||
| "Shape size is invalid"); | "Shape size is invalid"); | ||||
| auto offset = static_cast<uint64_t>(elem_num * kBytes); | auto offset = static_cast<uint64_t>(elem_num * kBytes); | ||||
| auto hbm_raw_data_base_addr = | auto hbm_raw_data_base_addr = | ||||
| reinterpret_cast<uint64_t>(reinterpret_cast<uintptr_t>(var_addr) + offset); | |||||
| static_cast<uint64_t>(reinterpret_cast<uintptr_t>(var_addr) + offset); | |||||
| for (int64_t i = elem_num - 1; i >= 0; --i) { | for (int64_t i = elem_num - 1; i >= 0; --i) { | ||||
| buff[i] = hbm_raw_data_base_addr + (buff[i] - buff[0]); | buff[i] = hbm_raw_data_base_addr + (buff[i] - buff[0]); | ||||
| } | } | ||||
| @@ -723,9 +723,9 @@ Status AicpuNodeTask::UpdateIoAddr(TaskContext &context) { | |||||
| auto io_addr = args_.get() + sizeof(aicpu::AicpuParamHead); | auto io_addr = args_.get() + sizeof(aicpu::AicpuParamHead); | ||||
| // if has input and output, need copy to ioaddr | // if has input and output, need copy to ioaddr | ||||
| error_t cpy_ret = memcpy_s(io_addr, args_size_ - sizeof(aicpu::AicpuParamHead), | |||||
| int cpy_ret = memcpy_s(io_addr, args_size_ - sizeof(aicpu::AicpuParamHead), | |||||
| &io_addrs[0], sizeof(uint64_t) * io_addrs.size()); | &io_addrs[0], sizeof(uint64_t) * io_addrs.size()); | ||||
| GE_CHK_BOOL_RET_STATUS(cpy_ret == EOK, INTERNAL_ERROR, | |||||
| GE_CHK_BOOL_RET_STATUS(cpy_ret == 0, INTERNAL_ERROR, | |||||
| "Node[%s] memcpy io addr to AicpuParamHead failed, ret=%d, args_size=%u, io nums=%zu.", | "Node[%s] memcpy io addr to AicpuParamHead failed, ret=%d, args_size=%u, io nums=%zu.", | ||||
| node_name_.c_str(), cpy_ret, args_size_, io_addrs.size()); | node_name_.c_str(), cpy_ret, args_size_, io_addrs.size()); | ||||
| return SUCCESS; | return SUCCESS; | ||||