Merged
废弃asc_get_block_num和asc_get_block_idx #5216
废弃asc_get_block_num和asc_get_block_idx #5216
Merged
CruiterAdd on Aug 20
Total: 3 files changed+37-4
@@ -39,9 +39,22 @@
39 39 
40__aicore__ inline int64_t asc_get_core_id() { return asc_get_core_id_impl(); }40__aicore__ inline int64_t asc_get_core_id() { return asc_get_core_id_impl(); }
41 41 
42-__aicore__ inline int64_t asc_get_block_idx() { return asc_get_block_idx_impl(); }42+[[deprecated("NOTICE: asc_get_block_idx is deprecated. "
43+ "Please use block_idx for pure Vector, pure Cube, and Mix(1, 1). "
44+ "For Mix(1, 2), please use block_idx on the Cube core and "
45+ "block_idx * asc_get_sub_block_num() + asc_get_sub_block_id() "
46+ "on Vector cores instead.")]]
47+__aicore__ inline int64_t asc_get_block_idx()
48+{
49+ return asc_get_block_idx_impl();
50+}
43 51 
44-__aicore__ inline int64_t asc_get_block_num() { return asc_get_block_num_impl(); }52+[[deprecated("NOTICE: asc_get_block_num is deprecated. "
53+ "Please use block_num instead.")]]
54+__aicore__ inline int64_t asc_get_block_num()
55+{
56+ return asc_get_block_num_impl();
57+}
45 58 
46__aicore__ inline int64_t asc_get_ctrl() { return asc_get_ctrl_impl(); }59__aicore__ inline int64_t asc_get_ctrl() { return asc_get_ctrl_impl(); }
47 60 
@@ -54,13 +54,26 @@ __aicore__ inline int64_t asc_get_squeeze_status() { return asc_get_squeeze_stat
54 54 
55__aicore__ inline int64_t asc_get_program_counter() { return asc_get_program_counter_impl(); }55__aicore__ inline int64_t asc_get_program_counter() { return asc_get_program_counter_impl(); }
56 56 
57-__aicore__ inline int64_t asc_get_block_idx() { return asc_get_block_idx_impl(); }57+[[deprecated("NOTICE: asc_get_block_idx is deprecated. "
58+ "Please use block_idx for pure Vector, pure Cube, and Mix(1, 1). "
59+ "For Mix(1, 2), please use block_idx on the Cube core and "
60+ "block_idx * asc_get_sub_block_num() + asc_get_sub_block_id() "
61+ "on Vector cores instead.")]] __aicore__ inline int64_t
62+asc_get_block_idx()
63+{
64+ return asc_get_block_idx_impl();
65+}
58 66 
59__aicore__ inline int64_t asc_get_sub_block_num() { return asc_get_sub_block_num_impl(); }67__aicore__ inline int64_t asc_get_sub_block_num() { return asc_get_sub_block_num_impl(); }
60 68 
61__aicore__ inline int64_t asc_get_sub_block_id() { return asc_get_sub_block_id_impl(); }69__aicore__ inline int64_t asc_get_sub_block_id() { return asc_get_sub_block_id_impl(); }
62 70 
63-__aicore__ inline int64_t asc_get_block_num() { return asc_get_block_num_impl(); }71+[[deprecated("NOTICE: asc_get_block_num is deprecated. "
72+ "Please use block_num instead.")]] __aicore__ inline int64_t
73+asc_get_block_num()
74+{
75+ return asc_get_block_num_impl();
76+}
64 77 
65__aicore__ inline int64_t asc_get_system_cycle() { return asc_get_system_cycle_impl(); }78__aicore__ inline int64_t asc_get_system_cycle() { return asc_get_system_cycle_impl(); }
66 79 
@@ -41,6 +41,8 @@ __aicore__ inline int64_t asc_get_sys_virtual_base();
41 41 
42__aicore__ inline int64_t asc_get_ctrl();42__aicore__ inline int64_t asc_get_ctrl();
43 43 
44+[[deprecated("NOTICE: asc_get_block_num is deprecated. "
45+ "Please use block_num instead.")]]
44__aicore__ inline int64_t asc_get_block_num();46__aicore__ inline int64_t asc_get_block_num();
45 47 
46/*48/*
@@ -48,6 +50,11 @@ __aicore__ inline int64_t asc_get_block_num();
48 * @brief:Get the index of the current running block50 * @brief:Get the index of the current running block
49 * @return:The index of the current running block51 * @return:The index of the current running block
50 */52 */
53+[[deprecated("NOTICE: asc_get_block_idx is deprecated. "
54+ "Please use block_idx for pure Vector, pure Cube, and Mix(1, 1). "
55+ "For Mix(1, 2), please use block_idx on the Cube core and "
56+ "block_idx * asc_get_sub_block_num() + asc_get_sub_block_id() "
57+ "on Vector cores instead.")]]
51__aicore__ inline int64_t asc_get_block_idx();58__aicore__ inline int64_t asc_get_block_idx();
52 59 
53/*60/*