已合并
浮点运算指令 #1774
zhangshunwei2创建于 4月23日
浮点运算指令 #1774
已合并
共 3 个文件变更+104-0
| @@ -474,6 +474,48 @@ static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __hgtux2_mask(bfloat16x2_t x, | |||
| 474 | 474 | ||
| 475 | static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __isnanx2(bfloat16x2_t x); | 475 | static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __isnanx2(bfloat16x2_t x); |
| 476 | 476 | ||
| 477 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __haddx2(const bfloat16x2_t x, const bfloat16x2_t y); | ||
| 478 | + | ||
| 479 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hsubx2(const bfloat16x2_t x, const bfloat16x2_t y); | ||
| 480 | + | ||
| 481 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hmulx2(const bfloat16x2_t x, const bfloat16x2_t y); | ||
| 482 | + | ||
| 483 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hdivx2(const bfloat16x2_t x, const bfloat16x2_t y); | ||
| 484 | + | ||
| 485 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __habsx2(const bfloat16x2_t x); | ||
| 486 | + | ||
| 487 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hfmax2(const bfloat16x2_t x, const bfloat16x2_t y, const bfloat16x2_t z); | ||
| 488 | + | ||
| 489 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hnegx2(const bfloat16x2_t x); | ||
| 490 | + | ||
| 491 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16_t __hadd(const bfloat16_t x, const bfloat16_t y); | ||
| 492 | + | ||
| 493 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16_t __hsub(const bfloat16_t x, const bfloat16_t y); | ||
| 494 | + | ||
| 495 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16_t __hmul(const bfloat16_t x, const bfloat16_t y); | ||
| 496 | + | ||
| 497 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16_t __hdiv(const bfloat16_t x, const bfloat16_t y); | ||
| 498 | + | ||
| 499 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16_t __hneg(const bfloat16_t x); | ||
| 500 | + | ||
| 501 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16_t __hmax_nan(const bfloat16_t x, const bfloat16_t y); | ||
| 502 | + | ||
| 503 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16_t __hmin_nan(const bfloat16_t x, const bfloat16_t y); | ||
| 504 | + | ||
| 505 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16_t __hfma_relu(const bfloat16_t x, const bfloat16_t y, const bfloat16_t z); | ||
| 506 | + | ||
| 507 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hmaxx2(const bfloat16x2_t x, const bfloat16x2_t y); | ||
| 508 | + | ||
| 509 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hminx2(const bfloat16x2_t x, const bfloat16x2_t y); | ||
| 510 | + | ||
| 511 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hmaxx2_nan(const bfloat16x2_t x, const bfloat16x2_t y); | ||
| 512 | + | ||
| 513 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hminx2_nan(const bfloat16x2_t x, const bfloat16x2_t y); | ||
| 514 | + | ||
| 515 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hfmax2_relu(const bfloat16x2_t x, const bfloat16x2_t y, const bfloat16x2_t z); | ||
| 516 | + | ||
| 517 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ bfloat16x2_t __hcmadd(const bfloat16x2_t x, const bfloat16x2_t y, const bfloat16x2_t z); | ||
| 518 | + | ||
| 477 | 519 | ||
| 478 | 520 | ||
| 479 | 521 | ||
| @@ -486,6 +486,48 @@ static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __hgtux2_mask(half2 x, half2 | |||
| 486 | 486 | ||
| 487 | static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __isnanx2(half2 x); | 487 | static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __isnanx2(half2 x); |
| 488 | 488 | ||
| 489 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hmaxx2(const half2 x, const half2 y); | ||
| 490 | + | ||
| 491 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hminx2(const half2 x, const half2 y); | ||
| 492 | + | ||
| 493 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __haddx2(const half2 x, const half2 y); | ||
| 494 | + | ||
| 495 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hsubx2(const half2 x, const half2 y); | ||
| 496 | + | ||
| 497 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hmulx2(const half2 x, const half2 y); | ||
| 498 | + | ||
| 499 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hdivx2(const half2 x, const half2 y); | ||
| 500 | + | ||
| 501 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __habsx2(const half2 x); | ||
| 502 | + | ||
| 503 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hfmax2(const half2 x, const half2 y, const half2 z); | ||
| 504 | + | ||
| 505 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hnegx2(const half2 x); | ||
| 506 | + | ||
| 507 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half __hadd(const half x, const half y); | ||
| 508 | + | ||
| 509 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half __hsub(const half x, const half y); | ||
| 510 | + | ||
| 511 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half __hmul(const half x, const half y); | ||
| 512 | + | ||
| 513 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half __hdiv(const half x, const half y); | ||
| 514 | + | ||
| 515 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half __hneg(const half x); | ||
| 516 | + | ||
| 517 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half __hmax_nan(const half x, const half y); | ||
| 518 | + | ||
| 519 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half __hmin_nan(const half x, const half y); | ||
| 520 | + | ||
| 521 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half __hfma_relu(const half x, const half y, const half z); | ||
| 522 | + | ||
| 523 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hmaxx2_nan(const half2 x, const half2 y); | ||
| 524 | + | ||
| 525 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hminx2_nan(const half2 x, const half2 y); | ||
| 526 | + | ||
| 527 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hfmax2_relu(const half2 x, const half2 y, const half2 z); | ||
| 528 | + | ||
| 529 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ half2 __hcmadd(const half2 x, const half2 y, const half2 z); | ||
| 530 | + | ||
| 489 | 531 | ||
| 490 | 532 | ||
| 491 | 533 | ||
| @@ -442,6 +442,26 @@ static __SIMT_DEVICE_FUNCTIONS_DECL__ int __popc(unsigned long x); | |||
| 442 | 442 | ||
| 443 | static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __byte_perm(unsigned int x, unsigned int y, unsigned int s); | 443 | static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __byte_perm(unsigned int x, unsigned int y, unsigned int s); |
| 444 | 444 | ||
| 445 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ float __saturatef(float x); | ||
| 446 | + | ||
| 447 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __sad(int x, int y, unsigned int z); | ||
| 448 | + | ||
| 449 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __usad(unsigned int x, unsigned int y, unsigned int z); | ||
| 450 | + | ||
| 451 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ int __mul24(int x, int y); | ||
| 452 | + | ||
| 453 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __umul24(unsigned int x, unsigned int y); | ||
| 454 | + | ||
| 455 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ float __fdividef(float x, float y); | ||
| 456 | + | ||
| 457 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ int __hadd(int x, int y); | ||
| 458 | + | ||
| 459 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ int __rhadd(int x, int y); | ||
| 460 | + | ||
| 461 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __uhadd(unsigned int x, unsigned int y); | ||
| 462 | + | ||
| 463 | +static __SIMT_DEVICE_FUNCTIONS_DECL__ unsigned int __urhadd(unsigned int x, unsigned int y); | ||
| 464 | + | ||
| 445 | 465 | ||
| 446 | 466 | ||
| 447 | 467 | ||