Compatibility is the key to ensuring that you can efficiently port operators. To ensure that the semantics and functions of Ascend C operators remain consistent during porting between different AI processors, you need to adapt and optimize the code based on the architecture of the target platform. If you want to run Ascend C operator programs developed on other platforms on the new platform, you need to recompile and run the programs on the new platform.
You can refer to the compatibility porting guide to learn about how to run 220x-based Ascend C programs on the 351x architecture.
Refer to the porting guide to learn about how to port operators developed on the Ascend platform to the Kirin platform.
To ensure compatibility, you are advised to avoid using the following APIs or programming methods during development. Otherwise, you need to ensure compatibility by yourself.
1 2 3 |
constexpr uint32_t MAX_UB_SIZE = 256 * 1024; // Recommended obtaining method: ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, MAX_UB_SIZE); ... |
1
|
copy_gm_to_ubuf(input_1_local_UB, input_1, 0, 1, 8, 0, 0); |
You are advised to use the following APIs or programming methods: