Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,10 @@ protected override void SetSpecialValues(Span<T> x, Span<T> y)
public static IEnumerable<object[]> SpanDestinationFunctionsToTest()
{
// The current trigonometric algorithm depends on hardware FMA support for best precision.
T? trigTolerance = IsFmaSupported ? null : Helpers.DetermineTolerance<T>(doubleTolerance: 1e-10, floatTolerance: 1e-4f);
// Even with FMA, ARM64 vectorized trig can diverge a few tens of ULPs from scalar.
T? trigTolerance = IsFmaSupported
? Helpers.DetermineTolerance<T>(doubleTolerance: 1e-14, floatTolerance: 1e-5f)
: Helpers.DetermineTolerance<T>(doubleTolerance: 1e-10, floatTolerance: 1e-4f);

yield return Create(TensorPrimitives.Acosh, T.Acosh);
yield return Create(TensorPrimitives.AcosPi, T.AcosPi);
Expand Down Expand Up @@ -571,7 +574,6 @@ public void SpanDestinationFunctions_SpecialValues(SpanDestinationDelegate tenso

[Theory]
[MemberData(nameof(SpanDestinationFunctionsToTest))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
public void SpanDestinationFunctions_ValueRange(SpanDestinationDelegate tensorPrimitivesMethod, Func<T, T> expectedMethod, T? tolerance = null)
{
Assert.All(VectorLengthAndIteratedRange(ConvertFromSingle(-100f), ConvertFromSingle(100f), ConvertFromSingle(3f)), arg =>
Expand Down
Loading