CANN/runtime模型Dump配置示例 2_model_dump_config【免费下载链接】runtime本项目提供CANN运行时组件和维测功能组件。项目地址: https://gitcode.com/cann/runtimeDescriptionThis example demonstrates how to use the model-level Dump configuration interfacesaclmdlInitDump,aclmdlSetDump,acldumpGetPath, andaclmdlFinalizeDumpto enable Dump based on a configuration file in a single operator API scenario and query the currently effective Dump output path.Product SupportThis sample supports the following products:ProductSupportedAtlas A3 Training Series Products/Atlas A3 Inference Series ProductsYesAtlas A2 Training Series Products/Atlas A2 Inference Series ProductsYesBuild and RunFor environment installation details and runtime details, see README in the example directory.Follow the steps below to run:# Replace ${install_root} with the CANN installation root directory, which is installed in /usr/local/Ascend by default source ${install_root}/cann/set_env.sh export ASCEND_INSTALL_PATH${install_root}/cann # Replace ${ascend_name} with the model of the Ascend AI processor. You can view the Name field using npu-smi info and remove spaces to obtain it, for example, ascend910b3 export SOC_VERSION${ascend_name} # Some examples involve calling AscendC operators and require configuring the path where the AscendC compiler ascendc.cmake is located, such as ${install_root}/cann/aarch64-linux/tikcpp/ascendc_kernel_cmake # You can search for ascendc_kernel_cmake in the CANN installation path, for example, find ./ -name ascendc_kernel_cmake, and replace ${cmake_path} with the path where ascendc_kernel_cmake is located export ASCENDC_CMAKE_DIR${cmake_path} # Build and run bash run.shCANN RUNTIME APIIn this sample, the key functional points and their key interfaces are as follows:InitializationCall the aclInit interface to initialize AscendCL configuration.Call the aclmdlInitDump interface to initialize Dump configuration.Call the aclmdlSetDump interface to load the Dump configuration file.Call the acldumpGetPath interface to query the current Dump output path.Call the aclmdlFinalizeDump interface to finalize the current Dump configuration.Call the aclFinalize interface to deinitialize AscendCL.Device ManagementCall the aclrtSetDevice interface to specify the Device for computation.Call the aclrtResetDeviceForce interface to forcibly reset the current computing Device and reclaim resources on the Device.Stream ManagementCall the aclrtCreateStream interface to create a Stream.Call the aclrtSynchronizeStream interface to block and wait for tasks on the Stream to complete.Call the aclrtDestroyStream interface to destroy a Stream.Memory ManagementCall the aclrtMalloc interface to allocate memory on the Device.Call the aclrtFree interface to free memory on the Device.Data TransferCall the aclrtMemcpy interface to implement data transfer through memory copy.NotesThis example uses the model-level Dump configuration interfaces in a single operator API scenario to complement the configuration-based Dump usage in theadumpdirectory.The configuration fileacl.jsonuses thedump_op_switch: onconfiguration recommended for single operator Dump scenarios.Known IssuesNone【免费下载链接】runtime本项目提供CANN运行时组件和维测功能组件。项目地址: https://gitcode.com/cann/runtime创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考