Home
last modified time | relevance | path

Searched refs:device_address (Results 1 – 25 of 48) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/runtime/device/gpu/
Dgpu_memory_copy_manager.cc32 void GPUMemCopyManager::AddMemSwapOutTask(const DeviceAddressPtr &device_address, const HostAddress… in AddMemSwapOutTask() argument
33 MS_EXCEPTION_IF_NULL(device_address); in AddMemSwapOutTask()
37 DeviceMemPtr device_ptr = const_cast<DeviceMemPtr>(device_address->GetPtr()); in AddMemSwapOutTask()
39 device_address->set_status(DeviceAddressStatus::kInDeviceToHost); in AddMemSwapOutTask()
47 swap_out_queue_.emplace(device_address, event); in AddMemSwapOutTask()
50 void GPUMemCopyManager::AddMemSwapInTask(const DeviceAddressPtr &device_address, const HostAddress … in AddMemSwapInTask() argument
52 MS_EXCEPTION_IF_NULL(device_address); in AddMemSwapInTask()
64 DeviceMemPtr device_ptr = const_cast<DeviceMemPtr>(device_address->GetPtr()); in AddMemSwapInTask()
66 device_address->set_status(DeviceAddressStatus::kInHostToDevice); in AddMemSwapInTask()
79 swap_in_queue_.emplace(device_address, end); in AddMemSwapInTask()
[all …]
Dgpu_kernel_runtime.cc334 auto device_address = GetMutableOutputAddr(item[0], output_index, false); in AllocInplaceNodeMemory() local
335 MS_EXCEPTION_IF_NULL(device_address); in AllocInplaceNodeMemory()
336 if (device_address->GetPtr() != nullptr) { in AllocInplaceNodeMemory()
344 auto ret = mem_manager_->MallocMemFromMemPool(device_address, output_size[output_index]); in AllocInplaceNodeMemory()
353 AnfAlgo::SetOutputAddr(device_address, index, node.get()); in AllocInplaceNodeMemory()
628 … auto device_address = CreateDeviceAddress(nullptr, output_sizes[i], output_format, output_type); in InitKernelOutputAddress() local
629 AnfAlgo::SetOutputAddr(device_address, i, kernel.get()); in InitKernelOutputAddress()
642 auto device_address = CreateDeviceAddress(nullptr, workspace_sizes[i], "", kTypeUnknown); in InitKernelWorkspaceAddress() local
643 AnfAlgo::SetWorkspaceAddr(device_address, i, kernel.get()); in InitKernelWorkspaceAddress()
688 auto device_address = AnfAlgo::GetMutableOutputAddr(kernel, i, false); in ClearKernelOutputAddress() local
[all …]
Dgpu_memory_copy_manager.h41 …void AddMemSwapOutTask(const DeviceAddressPtr &device_address, const HostAddress &host_addr) overr…
43 …void AddMemSwapInTask(const DeviceAddressPtr &device_address, const HostAddress &host_addr, bool p…
46 void AddMemSwapOutTaskMock(const DeviceAddressPtr &device_address) override;
48 void AddMemSwapInTaskMock(const DeviceAddressPtr &device_address) override;
Dgpu_bucket.cc59 …DeviceAddressPtr device_address = std::dynamic_pointer_cast<DeviceAddress>(tensor->device_address(… in AllocateAllReduceAddr() local
60 MS_EXCEPTION_IF_NULL(device_address); in AllocateAllReduceAddr()
61 auto origin_size = device_address->GetSize(); in AllocateAllReduceAddr()
67 …std::make_shared<kernel::Address>(static_cast<uint8_t *>(device_address->GetMutablePtr()), origin_… in AllocateAllReduceAddr()
Dgpu_kernel_runtime.h87 bool AttemptMallocMem(const DeviceAddressPtr &device_address, size_t size, bool mock);
106 void UpdateHostSwapInQueue(const DeviceAddressPtr device_address, bool mock);
/third_party/mindspore/mindspore/ccsrc/runtime/device/
Dkernel_runtime.cc235 auto device_address = CreateDeviceAddress(nullptr, tensor_size, output_format, output_type); in RunOpMallocPre() local
236 device_address->set_host_shape(trans::GetRuntimePaddingShape(node, i)); in RunOpMallocPre()
237 AnfAlgo::SetOutputAddr(device_address, i, node.get()); in RunOpMallocPre()
256 …utput_address = std::dynamic_pointer_cast<device::DeviceAddress>(current_tensor->device_address()); in RunOpMallocPre()
266 auto device_address = in RunOpMallocPre() local
268 AnfAlgo::SetOutputAddr(device_address, index, item.get()); in RunOpMallocPre()
269 current_tensor->set_device_address(device_address); in RunOpMallocPre()
295 …auto device_address = CreateDeviceAddress(nullptr, tensor_size, AnfAlgo::GetOutputFormat(input_nod… in ResetNodeAddress() local
297 AnfAlgo::SetOutputAddr(device_address, index, input_node.get()); in ResetNodeAddress()
407 …utput_address = std::dynamic_pointer_cast<device::DeviceAddress>(current_tensor->device_address()); in RunOpAssignInputMemory()
[all …]
Dbucket.cc76 auto device_address = std::dynamic_pointer_cast<DeviceAddress>(tensor->device_address()); in UpdateTensorAddr() local
78 MS_EXCEPTION_IF_NULL(device_address); in UpdateTensorAddr()
79 auto origin_dev_ptr = device_address->GetMutablePtr(); in UpdateTensorAddr()
81 device_address->from_mem_pool_ = false; in UpdateTensorAddr()
82 device_address->set_ptr(new_tensor_output_addrs_[i]); in UpdateTensorAddr()
/third_party/mindspore/mindspore/ccsrc/runtime/framework/
Dgraph_compiler.cc99 auto device_address = device_context->CreateDeviceAddress(nullptr, tensor_size, in CreateParameterDeviceAddress() local
101 AnfAlgo::SetOutputAddr(device_address, index, item.get()); in CreateParameterDeviceAddress()
121 … auto output_address = std::dynamic_pointer_cast<device::DeviceAddress>(tensor->device_address()); in CreateDeviceAddressForTensorValue()
126 …tOutputAddr(std::dynamic_pointer_cast<device::DeviceAddress>(tensor->device_address()), output_idx… in CreateDeviceAddressForTensorValue()
189 …auto device_address = device_context->CreateDeviceAddress(nullptr, output_sizes[i], output_format,… in CreateKernelOutputDeviceAddress() local
190 AnfAlgo::SetOutputAddr(device_address, i, kernel.get()); in CreateKernelOutputDeviceAddress()
208 …auto device_address = device_context->CreateDeviceAddress(nullptr, workspace_sizes[i], "", kTypeUn… in CreateKernelWorkspaceDeviceAddress() local
209 AnfAlgo::SetWorkspaceAddr(device_address, i, kernel.get()); in CreateKernelWorkspaceDeviceAddress()
241 auto device_address = AnfAlgo::GetMutableOutputAddr(group_nodes[0], output_index, false); in UpdateDeviceAddressForInplaceNode() local
242 MS_EXCEPTION_IF_NULL(device_address); in UpdateDeviceAddressForInplaceNode()
[all …]
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/tasksink/
Dtask_generator.cc84 auto device_address = AnfAlgo::GetOutputAddr(post_node, index); in LaunchAddrCleanAkgKernel() local
87 input->addr = device_address->ptr_; in LaunchAddrCleanAkgKernel()
88 input->size = device_address->size_; in LaunchAddrCleanAkgKernel()
112 auto device_address = AnfAlgo::GetOutputAddr(pre_node, index); in LaunchAddrCleanKernel() local
115 input->addr = device_address->ptr_; in LaunchAddrCleanKernel()
117 input->size = device_address->size_; in LaunchAddrCleanKernel()
126 auto device_address = AnfAlgo::GetWorkspaceAddr(pre_node, index); in LaunchAddrCleanKernel() local
129 workspace->addr = device_address->ptr_; in LaunchAddrCleanKernel()
131 workspace->size = device_address->size_; in LaunchAddrCleanKernel()
182 auto device_address = AnfAlgo::GetPrevNodeOutputAddr(anf_node_ptr, real_input_index); in LaunchKernel() local
[all …]
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/
Dascend_bucket.cc44 …DeviceAddressPtr device_address = std::dynamic_pointer_cast<DeviceAddress>(tensor->device_address(… in AllocateAllReduceAddr() local
45 MS_EXCEPTION_IF_NULL(device_address); in AllocateAllReduceAddr()
46 auto origin_size = device_address->GetSize(); in AllocateAllReduceAddr()
52 static_cast<uint8_t *>(device_address->GetMutablePtr()), device_address->GetSize())); in AllocateAllReduceAddr()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/mem_reuse/
Dmem_copy_manager.h106 …virtual void AddMemSwapOutTask(const DeviceAddressPtr &device_address, const HostAddress &host_add… in AddMemSwapOutTask() argument
108 …virtual void AddMemSwapInTask(const DeviceAddressPtr &device_address, const HostAddress &host_addr… in AddMemSwapInTask() argument
111 virtual void AddMemSwapOutTaskMock(const DeviceAddressPtr &device_address) {} in AddMemSwapOutTaskMock() argument
113 virtual void AddMemSwapInTaskMock(const DeviceAddressPtr &device_address) {} in AddMemSwapInTaskMock() argument
Dmem_swap_manager.cc304 void MemSwapManager::AddMemSwapTask(SwapKind swap_kind, const DeviceAddressPtr &device_address, in AddMemSwapTask() argument
309 mem_copy_manager_->AddMemSwapOutTask(device_address, host_address); in AddMemSwapTask()
311 mem_copy_manager_->AddMemSwapInTask(device_address, host_address, profiling, cost_time); in AddMemSwapTask()
316 mem_copy_manager_->AddMemSwapOutTaskMock(device_address); in AddMemSwapTask()
318 mem_copy_manager_->AddMemSwapInTaskMock(device_address); in AddMemSwapTask()
Dmem_reuse_checker.cc388 auto device_address = AnfAlgo::GetPrevNodeOutputAddr(node, real_input_index); in CheckNormalIR() local
389 MS_EXCEPTION_IF_NULL(device_address); in CheckNormalIR()
390 nor_input_tensors_.push_back(device_address->GetPtr()); in CheckNormalIR()
391 curr_ins.push_back(device_address->GetPtr()); in CheckNormalIR()
/third_party/mindspore/mindspore/ccsrc/runtime/device/cpu/
Dcpu_kernel_runtime.cc101 if (tensor->device_address() != nullptr) { in AssignValueNodeAddress()
102 …fAlgo::SetOutputAddr(std::dynamic_pointer_cast<device::DeviceAddress>(tensor->device_address()), 0, in AssignValueNodeAddress()
326 auto tensor_address = tensor->device_address(); in BindInputTensorAddressPtr()
370 auto address = tensor->device_address(); in BindOutputTensorAddressPtr()
439 auto device_address = AnfAlgo::GetPrevNodeMutableOutputAddr(kernel, i).get(); in Run() local
440 MS_EXCEPTION_IF_NULL(device_address); in Run()
441 AddRuntimeAddress(device_address, &kernel_inputs); in Run()
445 auto device_address = AnfAlgo::GetMutableOutputAddr(kernel, i).get(); in Run() local
446 MS_EXCEPTION_IF_NULL(device_address); in Run()
447 AddRuntimeAddress(device_address, &kernel_outputs); in Run()
[all …]
/third_party/mindspore/mindspore/ccsrc/runtime/framework/actor/
Ddata_prepare_actor.cc254 auto tensor_address = std::dynamic_pointer_cast<DeviceTensor>(input_tensor->device_address()); in PrepareDataForHostTensorQueue()
255 auto device_address = AnfAlgo::GetMutableOutputAddr(input_node, 0, false); in PrepareDataForHostTensorQueue() local
256 MS_EXCEPTION_IF_NULL(device_address); in PrepareDataForHostTensorQueue()
257 …if ((tensor_address != nullptr) && (tensor_address->DeviceType() == device_address->DeviceType()))… in PrepareDataForHostTensorQueue()
302 …auto host_tensor_address = std::dynamic_pointer_cast<DeviceTensor>(input_tensor->device_address()); in PrepareDataForStepMode()
314 auto device_address = device_context->CreateDeviceAddress( in PrepareDataForStepMode() local
316 AnfAlgo::SetOutputAddr(device_address, 0, input_node.get()); in PrepareDataForStepMode()
414 auto host_tensor_address = std::dynamic_pointer_cast<DeviceTensor>(tensor->device_address()); in PrepareDataForWeightNode()
567 auto tensor_address = std::dynamic_pointer_cast<DeviceTensor>(input_tensor->device_address()); in PrepareHostTensorQueueForControlNode()
568 auto device_address = AnfAlgo::GetMutableOutputAddr(backend_node, 0, false); in PrepareHostTensorQueueForControlNode() local
[all …]
Ddata_source_actor.cc225 auto device_address = AnfAlgo::GetMutableOutputAddr(data_node, 0, false); in FillDataBuffer() local
226 MS_EXCEPTION_IF_NULL(device_address); in FillDataBuffer()
227 (void)device_tensors.emplace_back(device_address.get()); in FillDataBuffer()
277 …uto tensor_device_address = std::dynamic_pointer_cast<DeviceTensor>(host_tensor->device_address()); in OnMemoryAllocFinish()
/third_party/mindspore/mindspore/ccsrc/backend/session/
Dascend_inference_session.cc44 auto device_address = AnfAlgo::GetMutableOutputAddr(pk_node, 0); in LoadInputData() local
45 MS_EXCEPTION_IF_NULL(device_address); in LoadInputData()
48 if (!device_address->SyncHostToDevice(trans::GetRuntimePaddingShape(pk_node, 0), in LoadInputData()
70 auto device_address = AnfAlgo::GetMutableOutputAddr(pk_node, 0); in CompileGraphImpl() local
71 MS_EXCEPTION_IF_NULL(device_address); in CompileGraphImpl()
77 if (!device_address->SyncHostToDevice(trans::GetRuntimePaddingShape(pk_node, 0), in CompileGraphImpl()
Dgpu_inference_session.cc44 auto device_address = AnfAlgo::GetMutableOutputAddr(pk_node, 0); in LoadInputData() local
45 MS_EXCEPTION_IF_NULL(device_address); in LoadInputData()
48 if (!device_address->SyncHostToDevice(trans::GetRuntimePaddingShape(pk_node, 0), in LoadInputData()
70 auto device_address = AnfAlgo::GetMutableOutputAddr(pk_node, 0); in CompileGraphImpl() local
71 MS_EXCEPTION_IF_NULL(device_address); in CompileGraphImpl()
77 if (!device_address->SyncHostToDevice(trans::GetRuntimePaddingShape(pk_node, 0), in CompileGraphImpl()
Dascend_session.cc211 device::DeviceAddressPtr device_address = in GenOpOutputStubTensor() local
213 stub_output_tensor->set_device_address(device_address); in GenOpOutputStubTensor()
243 auto device_address = cur_loop_tensor->device_address(); in LoadCtrlInputTensor() local
244 …if (!device_address->SyncHostToDevice(cur_loop_tensor->shape(), LongToSize(cur_loop_tensor->data()… in LoadCtrlInputTensor()
262 auto device_address = next_loop_tensor->device_address(); in LoadCtrlInputTensor() local
263 …if (!device_address->SyncHostToDevice(next_loop_tensor->shape(), LongToSize(next_loop_tensor->data… in LoadCtrlInputTensor()
279 auto device_address = epoch_tensor->device_address(); in LoadCtrlInputTensor() local
280 …if (!device_address->SyncHostToDevice(epoch_tensor->shape(), LongToSize(epoch_tensor->data().nbyte… in LoadCtrlInputTensor()
326 auto device_address = AnfAlgo::GetMutableOutputAddr(parameter, 0); in TensorNeedSync() local
328 return tensor->device_address().get() == nullptr || tensor->device_address() != device_address; in TensorNeedSync()
[all …]
Dgpu_session.cc342 auto device_address = AnfAlgo::GetMutableOutputAddr(pk_node, 0); in LoadInputData() local
343 MS_EXCEPTION_IF_NULL(device_address); in LoadInputData()
344 … auto tensor_address = std::dynamic_pointer_cast<device::DeviceAddress>(tensor->device_address()); in LoadInputData()
347 if (tensor_address == nullptr || tensor_address != device_address) { in LoadInputData()
352 } else if (tensor_address != device_address) { in LoadInputData()
353 if (tensor_address->DeviceType() == device_address->DeviceType()) { in LoadInputData()
362 tensor->set_device_address(device_address); in LoadInputData()
365 …if (!device_address->SyncHostToDevice(trans::GetRuntimePaddingShape(pk_node, 0), size, tensor->dat… in LoadInputData()
Danf_runtime_algorithm.cc2361 auto device_address = GetPrevNodeMutableOutputAddr(kernel, real_input); in CacheAddrForGraph() local
2362 SetOutputAddr(device_address, idx, kernel.get()); in CacheAddrForGraph()
2402 auto device_address = GetPrevNodeOutputAddr(node, real_input, visit_nop_node); in CacheAddrForKernel() local
2403 MS_EXCEPTION_IF_NULL(device_address); in CacheAddrForKernel()
2406 input->addr = const_cast<void *>(device_address->GetPtr()); in CacheAddrForKernel()
2408 input->size = device_address->GetSize(); in CacheAddrForKernel()
2412 auto device_address = GetOutputAddr(node, i, visit_nop_node); in CacheAddrForKernel() local
2415 output->addr = const_cast<void *>(device_address->GetPtr()); in CacheAddrForKernel()
2417 output->size = device_address->GetSize(); in CacheAddrForKernel()
2421 auto device_address = GetWorkspaceAddr(node, i); in CacheAddrForKernel() local
[all …]
/third_party/mindspore/mindspore/ccsrc/ps/ps_cache/
Dps_cache_manager.cc136 return iter->second.device_address; in QueryHashTableAddr()
223 auto &device_address = item.second.device_address; in AllocMemForHashTable() local
224 device_address.size = vocab_cache_size_ * embedding_size * sizeof(float); in AllocMemForHashTable()
225 auto addr = embedding_device_cache_->cache_->MallocMemory(device_address.size); in AllocMemForHashTable()
227 device_address.addr = addr; in AllocMemForHashTable()
806 MS_ERROR_IF_NULL_W_RET_VAL(hash_info.device_address.addr, false); in HashSwapHostToDevice()
807 auto hash_table_addr = reinterpret_cast<float *>(hash_info.device_address.addr); in HashSwapHostToDevice()
837 auto hash_table_addr = reinterpret_cast<float *>(hash_info.device_address.addr); in HashSwapDeviceToHost()
925 MS_ERROR_IF_NULL_W_RET_VAL(hash_info.device_address.addr, false); in HashSwapDeviceOut()
926 auto hash_table_addr = reinterpret_cast<float *>(hash_info.device_address.addr); in HashSwapDeviceOut()
[all …]
/third_party/mindspore/tests/ut/cpp/session/
Danf_runtime_algorithm_test.cc517 auto device_address = std::make_shared<AscendDeviceAddress>(addr, 1); in TEST_F() local
518 d_kernel_info->SetOutputAddr(device_address, 0); in TEST_F()
519 EXPECT_EQ(AnfAlgo::GetOutputAddr(add, 0), device_address.get()); in TEST_F()
532 auto device_address = std::make_shared<AscendDeviceAddress>(addr, 1); in TEST_F() local
533 d_kernel_info->SetOutputAddr(device_address, 0); in TEST_F()
536 EXPECT_EQ(AnfAlgo::GetPrevNodeOutputAddr(add, 0), device_address.get()); in TEST_F()
549 auto device_address = std::make_shared<AscendDeviceAddress>(addr, 1); in TEST_F() local
550 EXPECT_THROW(AnfAlgo::SetOutputAddr(device_address, 0, nullptr), std::runtime_error); in TEST_F()
551 AnfAlgo::SetOutputAddr(device_address, 0, add.get()); in TEST_F()
552 EXPECT_EQ(AnfAlgo::GetOutputAddr(add, 0), device_address.get()); in TEST_F()
[all …]
/third_party/libusb/libusb/os/
Dopenbsd_usb.c174 dev->device_address = di.udi_addr; in obsd_get_device_list()
286 udf.udf_addr = dev->device_address; in obsd_get_config_descriptor()
394 req.ucr_addr = handle->dev->device_address; in obsd_clear_halt()
515 usbi_dbg("fd %d, addr %d", fd, dev->device_address); in _cache_active_config_descriptor()
518 udc.udc_addr = dev->device_address; in _cache_active_config_descriptor()
534 udf.udf_addr = dev->device_address; in _cache_active_config_descriptor()
574 req.ucr_addr = transfer->dev_handle->dev->device_address; in _sync_control_transfer()
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/dump/
Ddata_dumper.cc187 MS_EXCEPTION_IF_NULL(current_step_tensor->device_address()); in SetOpMappingInfo()
188 MS_EXCEPTION_IF_NULL(currnet_epoch_tensor->device_address()); in SetOpMappingInfo()
189 MS_EXCEPTION_IF_NULL(steps_per_epoch_tensor->device_address()); in SetOpMappingInfo()
191 void *current_step = current_step_tensor->device_address()->GetMutablePtr(); in SetOpMappingInfo()
192 void *current_epoch = currnet_epoch_tensor->device_address()->GetMutablePtr(); in SetOpMappingInfo()
193 void *steps_per_epoch = steps_per_epoch_tensor->device_address()->GetMutablePtr(); in SetOpMappingInfo()

12