cann.cpp 383 B

1234567891011121314151617181920
  1. #include <acl/acl.h>
  2. #include <unistd.h> // fork()
  3. #include <iostream>
  4. int main(int /*argc*/, char** /*argv*/)
  5. {
  6. int ret = aclInit(NULL);
  7. if (ret != 0)
  8. {
  9. std::cerr << "Failed to initialize Ascend, ret = " << ret;
  10. }
  11. ret = aclFinalize();
  12. if (ret != 0)
  13. {
  14. std::cerr << "Failed to de-initialize Ascend, ret = " << ret;
  15. }
  16. return 0;
  17. }