You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

acl_rt.cc 2.3 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * Copyright 2021 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include "acl/acl_rt.h"
  17. /**
  18. * @ingroup AscendCL
  19. * @brief synchronous memory replication between host and device
  20. *
  21. * @param dst [IN] destination address pointer
  22. * @param destMax [IN] Max length of the destination address memory
  23. * @param src [IN] source address pointer
  24. * @param count [IN] the length of byte to copy
  25. * @param kind [IN] memcpy type
  26. *
  27. * @retval ACL_SUCCESS The function is successfully executed.
  28. * @retval OtherValues Failure
  29. */
  30. ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, size_t destMax, const void *src, size_t count,
  31. aclrtMemcpyKind kind) {
  32. return ACL_ERROR_NONE;
  33. }
  34. /**
  35. * @ingroup AscendCL
  36. * @brief Asynchronous memory replication between Host and Device
  37. *
  38. * @par Function
  39. * After calling this interface,
  40. * be sure to call the aclrtSynchronizeStream interface to ensure that
  41. * the task of memory replication has been completed
  42. *
  43. * @par Restriction
  44. * @li For on-chip Device-to-Device memory copy,
  45. * both the source and destination addresses must be 64-byte aligned
  46. *
  47. * @param dst [IN] destination address pointer
  48. * @param destMax [IN] Max length of destination address memory
  49. * @param src [IN] source address pointer
  50. * @param count [IN] the number of byte to copy
  51. * @param kind [IN] memcpy type
  52. * @param stream [IN] asynchronized task stream
  53. *
  54. * @retval ACL_SUCCESS The function is successfully executed.
  55. * @retval OtherValues Failure
  56. *
  57. * @see aclrtSynchronizeStream
  58. */
  59. ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, size_t destMax, const void *src, size_t count,
  60. aclrtMemcpyKind kind, aclrtStream stream) {
  61. return ACL_ERROR_NONE;
  62. }