#include #include #include #include "third_party/acl/inc/acl/acl_base.h" #include "third_party/acl/inc/acl/acl_rt.h" extern "C" { static bool useflag = false; void* my_malloc(ssize_t size, int device, aclrtStream stream) { void *ptr; aclrtMallocAlign32(&ptr, size, aclrtMemMallocPolicy::ACL_MEM_MALLOC_HUGE_FIRST); std::cout<<"alloc ptr = "<