Skip to content

SIMT接口软仿情况汇总

本节按照SIMT API文档所在目录分级汇总各接口的软仿情况。

非软仿接口是指使用单一硬件指令完成操作的接口;软仿接口是指由编译器实现,或由上层接口通过拼接多条硬件指令实现功能的接口。

Warp函数

LaneID类函数

API名API是否软仿
laneid
lanemask_eq
lanemask_ge
lanemask_gt
lanemask_le
lanemask_lt

Warp Reduce类函数

API名API是否软仿
asc_reduce_add
asc_reduce_max
asc_reduce_min

Warp Shfl类函数

API名API是否软仿
asc_shfl
asc_shfl_down
asc_shfl_up
asc_shfl_xor

Warp Vote类函数

API名API是否软仿
asc_activemask
asc_all
asc_any
asc_ballot

协作组

API名API是否软仿
binary_partition
tiled_partition

coalesced_group

API名API是否软仿
all
any
ballot
coalesced_group构造函数
meta_group_rank
meta_group_size
num_threads
shfl
shfl_down
shfl_up
size
sync
thread_rank

thread_block

API名API是否软仿
dim_threads
group_dim
group_index
num_threads
size
sync
thread_block构造函数
thread_index
thread_rank

thread_block_tile

API名API是否软仿
all
any
ballot
meta_group_rank
meta_group_size
num_threads
shfl
shfl_down
shfl_up
shfl_xor
size
sync
thread_block_tile构造函数
thread_rank

原子操作

下表汇总原子操作接口在SIMD与SIMT编程场景下的软仿情况。SIMT编程场景中,接口形参不携带UB/GM地址空间标识,编译器需先完成入参指针到UB/GM地址空间指针的转换,再完成对应的原子操作实现。

API名非软仿数据类型软仿数据类型
asc_atomic_addint32_t、uint32_t、int64_t、uint64_t、half、bfloat16_tfloat、half2、bfloat16x2_t
asc_atomic_and-所有数据类型
asc_atomic_casuint32_t、uint64_tint32_t、int64_t、float、half、bfloat16_t、half2、bfloat16x2_t
asc_atomic_exchuint32_t、uint64_tint32_t、int64_t、float、half、bfloat16_t、half2、bfloat16x2_t
asc_atomic_dec-所有数据类型
asc_atomic_inc-所有数据类型
asc_atomic_maxuint32_t、int32_t、int64_t、uint64_t、half、bfloat16_tfloat、half2、bfloat16x2_t
asc_atomic_minuint32_t、int32_t、int64_t、uint64_t、half、bfloat16_tfloat、half2、bfloat16x2_t
asc_atomic_or-所有数据类型
asc_atomic_sub-所有数据类型
asc_atomic_xor-所有数据类型

同步与内存栅栏

内存栅栏接口

API名API是否软仿
asc_threadfence
asc_threadfence_block

同步接口

API名API是否软仿
asc_syncthreads

地址空间谓词函数

API名API是否软仿
__isGlobal
__isLocal
__isUbuf

地址空间转换函数

API名API是否软仿
__cvta_generic_to_global
__cvta_generic_to_local
__cvta_generic_to_ubuf
__cvta_global_to_generic
__cvta_local_to_generic
__cvta_ubuf_to_generic

数学函数

bfloat16类型

bfloat16x2类型数学库函数

API名API是否软仿
h2ceil
h2cos
h2exp
h2exp10
h2exp2
h2floor
h2log
h2log10
h2log2
h2rcp
h2rint
h2rsqrt
h2sin
h2sqrt
h2tanh
h2trunc

bfloat16x2类型比较函数

API名API是否软仿
__hbequx2
__hbeqx2
__hbgeux2
__hbgex2
__hbgtux2
__hbgtx2
__hbleux2
__hblex2
__hbltux2
__hbltx2
__hbneux2
__hbnex2
__hequx2
__hequx2_mask
__heqx2
__heqx2_mask
__hgeux2
__hgeux2_mask
__hgex2
__hgex2_mask
__hgtux2
__hgtux2_mask
__hgtx2
__hgtx2_mask
__hleux2
__hleux2_mask
__hlex2
__hlex2_mask
__hltux2
__hltux2_mask
__hltx2
__hltx2_mask
__hmaxx2
__hmaxx2_nan
__hminx2
__hminx2_nan
__hneux2
__hneux2_mask
__hnex2
__hnex2_mask
__isnanx2

bfloat16x2类型算术函数

API名API是否软仿
__habsx2
__haddx2
__hcmadd
__hdivx2
__hfmax2
__hfmax2_relu
__hmulx2
__hnegx2
__hsubx2

bfloat16类型数学库函数

API名API是否软仿
hceil
hcos
hexp
hexp10
hexp2
hfloor
hlog
hlog10
hlog2
hrcp
hrint
hrsqrt
hsin
hsqrt
htanh
htrunc

bfloat16类型比较函数

API名API是否软仿
__heq
__hequ
__hge
__hgeu
__hgt
__hgtu
__hisinf
__hisnan
__hle
__hleu
__hlt
__hltu
__hmax
__hmax_nan
__hmin
__hmin_nan
__hne
__hneu

bfloat16类型算术函数

API名API是否软仿
__habs
__hadd
__hdiv
__hfma
__hfma_relu
__hmul
__hneg
__hsub

bfloat16类型精度转换函数

API名API是否软仿
__bfloat1622float2
__bfloat162bfloat162
__bfloat162bfloat16_rd
__bfloat162bfloat16_rn
__bfloat162bfloat16_rna
__bfloat162bfloat16_ru
__bfloat162bfloat16_rz
__bfloat162float
__bfloat162int_rd
__bfloat162int_rn
__bfloat162int_rna
__bfloat162int_ru
__bfloat162int_rz
__bfloat162ll_rd
__bfloat162ll_rn
__bfloat162ll_rna
__bfloat162ll_ru
__bfloat162ll_rz
__bfloat162uint_rd
__bfloat162uint_rn
__bfloat162uint_rna
__bfloat162uint_ru
__bfloat162uint_rz
__bfloat162ull_rd
__bfloat162ull_rn
__bfloat162ull_rna
__bfloat162ull_ru
__bfloat162ull_rz
__float22bfloat162_rd
__float22bfloat162_rd_sat
__float22bfloat162_rn
__float22bfloat162_rn_sat
__float22bfloat162_rna
__float22bfloat162_rna_sat
__float22bfloat162_ru
__float22bfloat162_ru_sat
__float22bfloat162_rz
__float22bfloat162_rz_sat
__float2bfloat16
__float2bfloat162_rn
__float2bfloat16_rd
__float2bfloat16_rd_sat
__float2bfloat16_rn
__float2bfloat16_rn_sat
__float2bfloat16_rna
__float2bfloat16_rna_sat
__float2bfloat16_ru
__float2bfloat16_ru_sat
__float2bfloat16_rz
__float2bfloat16_rz_sat
__floats2bfloat162_rn
__half2bfloat16_rd
__half2bfloat16_rn
__half2bfloat16_rna
__half2bfloat16_ru
__half2bfloat16_rz
__halves2bfloat162
__high2bfloat16
__high2bfloat162
__high2float
__highs2bfloat162
__int2bfloat16_rd
__int2bfloat16_rn
__int2bfloat16_rna
__int2bfloat16_ru
__int2bfloat16_rz
__ll2bfloat16_rd
__ll2bfloat16_rn
__ll2bfloat16_rna
__ll2bfloat16_ru
__ll2bfloat16_rz
__low2bfloat16
__low2bfloat162
__low2float
__lowhigh2highlow
__lows2bfloat162
__uint2bfloat16_rd
__uint2bfloat16_rn
__uint2bfloat16_rna
__uint2bfloat16_ru
__uint2bfloat16_rz
__ull2bfloat16_rd
__ull2bfloat16_rn
__ull2bfloat16_rna
__ull2bfloat16_ru
__ull2bfloat16_rz
__ushort_as_bfloat16

float类型数学库函数

API名API是否软仿
__fdividef
__saturatef
acosf
acoshf
asinf
asinhf
atan2f
atanf
atanhf
cbrtf
ceilf
copysignf
cosf
coshf
cospif
cyl_bessel_i0f
cyl_bessel_i1f
erfcf
erfcinvf
erfcxf
erff
erfinvf
exp10f
exp2f
expf
expm1f
fabsf
fdimf
fdividef
floorf
fmaf
fmaxf
fminf
fmodf
frexpf
hypotf
ilogbf
isfinite
isinf
isnan
j0f
j1f
jnf
ldexpf
lgammaf
llrintf
llroundf
log10f
log1pf
log2f
logbf
logf
lrintf
lroundf
modff
nearbyintf
nextafterf
norm3df
norm4df
normcdff
normcdfinvf
normf
powf
rcbrtf
remainderf
remquof
rhypotf
rintf
rnorm3df
rnorm4df
rnormf
roundf
rsqrtf
scalblnf
scalbnf
signbit
sincosf
sincospif
sinf
sinhf
sinpif
sqrtf
tanf
tanhf
tanpif
tgammaf
truncf
y0f
y1f
ynf

fp8类型

fp8数据转换函数

API名API是否软仿
__asc_cvt_float2_to_fp8x2
__e4m3x22float2
__e5m2x22float2
__float22hif82_rh
__float22hif82_rh_sat
__float22hif82_rna
__float22hif82_rna_sat
__half22hif82_rh
__half22hif82_rh_sat
__half22hif82_rna
__half22hif82_rna_sat
__hif822float2
__hif822half2

half类型

half2类型数学库函数

API名API是否软仿
h2ceil
h2cos
h2exp
h2exp10
h2exp2
h2floor
h2log
h2log10
h2log2
h2rcp
h2rint
h2rsqrt
h2sin
h2sqrt
h2tanh
h2trunc

half2类型比较函数

API名API是否软仿
__hbequx2
__hbeqx2
__hbgeux2
__hbgex2
__hbgtux2
__hbgtx2
__hbleux2
__hblex2
__hbltux2
__hbltx2
__hbneux2
__hbnex2
__hequx2
__hequx2_mask
__heqx2
__heqx2_mask
__hgeux2
__hgeux2_mask
__hgex2
__hgex2_mask
__hgtux2
__hgtux2_mask
__hgtx2
__hgtx2_mask
__hleux2
__hleux2_mask
__hlex2
__hlex2_mask
__hltux2
__hltux2_mask
__hltx2
__hltx2_mask
__hmaxx2
__hmaxx2_nan
__hminx2
__hminx2_nan
__hneux2
__hneux2_mask
__hnex2
__hnex2_mask
__isnanx2

half2类型算术函数

API名API是否软仿
__habsx2
__haddx2
__hcmadd
__hdivx2
__hfmax2
__hfmax2_relu
__hmulx2
__hnegx2
__hsubx2

half类型数学库函数

API名API是否软仿
hceil
hcos
hexp
hexp10
hexp2
hfloor
hlog
hlog10
hlog2
hrcp
hrint
hrsqrt
hsin
hsqrt
htanh
htrunc

half类型比较函数

API名API是否软仿
__heq
__hequ
__hge
__hgeu
__hgt
__hgtu
__hisinf
__hisnan
__hle
__hleu
__hlt
__hltu
__hmax
__hmax_nan
__hmin
__hmin_nan
__hne
__hneu

half类型算术函数

API名API是否软仿
__habs
__hadd
__hdiv
__hfma
__hfma_relu
__hmul
__hneg
__hsub

half类型精度转换函数

API名API是否软仿
__bfloat162half_rd
__bfloat162half_rd_sat
__bfloat162half_rn
__bfloat162half_rn_sat
__bfloat162half_rna
__bfloat162half_rna_sat
__bfloat162half_ru
__bfloat162half_ru_sat
__bfloat162half_rz
__bfloat162half_rz_sat
__float22half2_rd
__float22half2_rd_sat
__float22half2_rn
__float22half2_rn_sat
__float22half2_rna
__float22half2_rna_sat
__float22half2_ro
__float22half2_ro_sat
__float22half2_ru
__float22half2_ru_sat
__float22half2_rz
__float22half2_rz_sat
__float2half
__float2half_rd
__float2half_rd_sat
__float2half_rn
__float2half_rn_sat
__float2half_rna
__float2half_rna_sat
__float2half_ro
__float2half_ro_sat
__float2half_ru
__float2half_ru_sat
__float2half_rz
__float2half_rz_sat
__floats2half2_rn
__half22float2
__half2float
__half2half_rd
__half2half_rn
__half2half_rna
__half2half_ru
__half2half_rz
__half2int_rd
__half2int_rn
__half2int_rna
__half2int_ru
__half2int_rz
__half2ll_rd
__half2ll_rn
__half2ll_rna
__half2ll_ru
__half2ll_rz
__half2uint_rd
__half2uint_rn
__half2uint_rna
__half2uint_ru
__half2uint_rz
__half2ull_rd
__half2ull_rn
__half2ull_rna
__half2ull_ru
__half2ull_rz
__halves2half2
__high2float
__high2half
__high2half2
__highs2half2
__int2half_rd
__int2half_rd_sat
__int2half_rn
__int2half_rn_sat
__int2half_rna
__int2half_rna_sat
__int2half_ru
__int2half_ru_sat
__int2half_rz
__int2half_rz_sat
__ll2half_rd
__ll2half_rn
__ll2half_rna
__ll2half_ru
__ll2half_rz
__low2float
__low2half
__low2half2
__lowhigh2highlow
__lows2half2
__uint2half_rd
__uint2half_rd_sat
__uint2half_rn
__uint2half_rn_sat
__uint2half_rna
__uint2half_rna_sat
__uint2half_ru
__uint2half_ru_sat
__uint2half_rz
__uint2half_rz_sat
__ull2half_rd
__ull2half_rn
__ull2half_rna
__ull2half_ru
__ull2half_rz
__ushort_as_half

数据类型转换

类型转换函数

API名API是否软仿
__float2float_rd
__float2float_rn
__float2float_rna
__float2float_ru
__float2float_rz
__float2int_rd
__float2int_rn
__float2int_rna
__float2int_ru
__float2int_rz
__float2ll_rd
__float2ll_rn
__float2ll_rna
__float2ll_ru
__float2ll_rz
__float2uint_rd
__float2uint_rn
__float2uint_rna
__float2uint_ru
__float2uint_rz
__float2ull_rd
__float2ull_rn
__float2ull_rna
__float2ull_ru
__float2ull_rz
__float_as_int
__float_as_uint
__int2float_rd
__int2float_rn
__int2float_rna
__int2float_ru
__int2float_rz
__int_as_float
__ll2float_rd
__ll2float_rn
__ll2float_rna
__ll2float_ru
__ll2float_rz
__uint2float_rd
__uint2float_rn
__uint2float_rna
__uint2float_ru
__uint2float_rz
__uint_as_float
__ull2float_rd
__ull2float_rn
__ull2float_rna
__ull2float_ru
__ull2float_rz

整型数学库函数

API名API是否软仿
__brev
__byte_perm
__clz
__ffs
__hadd
__mul24
__mul64hi
__mul_i32toi64
__mulhi
__popc
__rhadd
__sad
__uhadd
__umul24
__umul64hi
__umulhi
__urhadd
__usad
labs
llabs
llmax
llmin
max
min
ullmax
ullmin
umax
umin

访存函数

API名API是否软仿
asc_dcci_entire
asc_dcci_single
asc_ldca
asc_ldcg
asc_stcg
asc_stwt

免责声明:本站内容由 asc-devkit 仓 master 分支自动编译生成,属于持续开发版本,可能存在缺陷,仅供预览与参考。如需稳定及商用资料,请查阅官方 昇腾社区