Skip to content

f16-vsin/vcos use degree 3 polynomial - #10810

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_951618805
Jul 24, 2026
Merged

f16-vsin/vcos use degree 3 polynomial#10810
copybara-service[bot] merged 1 commit into
masterfrom
test_951618805

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

f16-vsin/vcos use degree 3 polynomial

  • fix catastrophic cancellation in cosine and vectorize sine
  • cosine using modulo-pi/2 range reduction

@copybara-service copybara-service Bot changed the title [XNNPACK] Add poly-5 and poly-3 minimax polynomial microkernels for f32/f16 vsin and vcos. Implement branchless minimax polynomial approximation for f32 and f16 vsin/vcos, including RVV templates. Jul 21, 2026
@ken-unger

Copy link
Copy Markdown
Contributor

The rvv cmake and bzl files would need to be updated.

@copybara-service copybara-service Bot changed the title Implement branchless minimax polynomial approximation for f32 and f16 vsin/vcos, including RVV templates. Fix catastrophic cancellation in f32 and f16 vcos microkernels near x = pi + 2*pi*n by replacing floating-point theta offsets with integer quadrant range reduction and symmetry/sign folding, ensuring exact numerical equivalence with YNNPACK. Jul 22, 2026
@copybara-service
copybara-service Bot force-pushed the test_951618805 branch 6 times, most recently from ed96213 to 87292e4 Compare July 23, 2026 22:41
@copybara-service copybara-service Bot changed the title Fix catastrophic cancellation in f32 and f16 vcos microkernels near x = pi + 2*pi*n by replacing floating-point theta offsets with integer quadrant range reduction and symmetry/sign folding, ensuring exact numerical equivalence with YNNPACK. Fix catastrophic cancellation in f32 and f16 vcos microkernels Jul 23, 2026
@copybara-service
copybara-service Bot force-pushed the test_951618805 branch 3 times, most recently from 17eef64 to 37af008 Compare July 24, 2026 01:56
@copybara-service copybara-service Bot changed the title Fix catastrophic cancellation in f32 and f16 vcos microkernels f16-vsin/vcos use degree 3 polynomial Jul 24, 2026
  - fix catastrophic cancellation in cosine and vectorize sine
  - cosine using modulo-pi/2 range reduction

PiperOrigin-RevId: 953097089
@copybara-service
copybara-service Bot merged commit 10c418c into master Jul 24, 2026
@copybara-service
copybara-service Bot deleted the test_951618805 branch July 24, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants