已合并
新增asc_nop接口 #4081
shaonaite创建于 7月7日
新增asc_nop接口 #4081
已合并
共 2 个文件变更+7-0
| @@ -1817,6 +1817,11 @@ __SIMT_DEVICE_FUNCTIONS_DECL__ inline void asc_dcci_single(void* dst) { | |||
| 1817 | #endif | 1817 | #endif |
| 1818 | } | 1818 | } |
| 1819 | 1819 | ||
| 1820 | +__SIMT_DEVICE_FUNCTIONS_DECL__ inline void asc_nop() | ||
| 1821 | +{ | ||
| 1822 | + asm volatile("NOP wait:0b0000000 stall:15"::); // skip 15 cycle | ||
| 1823 | +} | ||
| 1824 | + | ||
| 1820 | #endif | 1825 | #endif |
| 1821 | #endif // IMPL_SIMT_API_DEVICE_FUNCTIONS_IMPL_H | 1826 | #endif // IMPL_SIMT_API_DEVICE_FUNCTIONS_IMPL_H |
| 1822 | 1827 | ||
| @@ -759,6 +759,8 @@ __SIMT_DEVICE_FUNCTIONS_DECL__ inline void asc_dcci_single(void* dst); | |||
| 759 | #endif | 759 | #endif |
| 760 | } | 760 | } |
| 761 | 761 | ||
| 762 | +__SIMT_DEVICE_FUNCTIONS_DECL__ inline void asc_nop(); | ||
| 763 | + | ||
| 762 | #include "impl/simt_api/device_functions_impl.h" | 764 | #include "impl/simt_api/device_functions_impl.h" |
| 763 | 765 | ||
| 764 | #if defined(__UNDEF_ASCENDC_INCLUDE_INTERNAL_HEADERS_DEVICE_FUNCTIONS_H__) | 766 | #if defined(__UNDEF_ASCENDC_INCLUDE_INTERNAL_HEADERS_DEVICE_FUNCTIONS_H__) |