GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ENH: Re-enable VXE from build targets for sin/cos by r-devulap · Pull Request #27665 · numpy/numpy

Conversation

@r-devulap

@r-devulap r-devulap commented Oct 29, 2024 •
edited by seiko2plus
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

As discussed in the optimization meeting, @seiko2plus wanted to split VSX and VXE into two separate PR's.

For clarification, SIMD optimizations for sine and cosine functions on both ppc64 and z/Architecture (IBM Z) were disabled by #25781 to bypass CI tests. This PR aims to re-enable optimizations for z/Architecture after addressing the following runtime errors, while #27627 re-enabled ppc64 optimizations.

numpy/_core/tests/test_umath_accuracy.py:84: AssertionError
=========================== short test summary info ============================
FAILED numpy/_core/tests/test_umath.py::TestSpecialFloats::test_sincos_values[f] - AssertionError: 
FAILED numpy/_core/tests/test_umath.py::TestSpecialFloats::test_sincos_errors[inf-f-sin] - AssertionError: FloatingPointError not raised by sin
FAILED numpy/_core/tests/test_umath.py::TestSpecialFloats::test_sincos_errors[inf-f-cos] - AssertionError: FloatingPointError not raised by cos
FAILED numpy/_core/tests/test_umath.py::TestSpecialFloats::test_sincos_errors[-inf-f-sin] - AssertionError: FloatingPointError not raised by sin
FAILED numpy/_core/tests/test_umath.py::TestSpecialFloats::test_sincos_errors[-inf-f-cos] - AssertionError: FloatingPointError not raised by cos
FAILED numpy/_core/tests/test_umath.py::TestAVXFloat32Transcendental::test_sincos_float32 - AssertionError: Arrays are not almost equal up to 2 ULP (max difference is ...
FAILED numpy/_core/tests/test_umath.py::TestAVXFloat32Transcendental::test_strided_float32 - AssertionError: Arrays are not equal to 2 ULP (max is 1.05785e+09)
FAILED numpy/_core/tests/test_umath_accuracy.py::TestAccuracy::test_validate_fp16_transcendentals[cos] - AssertionError: Arrays are not almost equal up to 1 ULP (max difference is ...
FAILED numpy/_core/tests/test_umath_accuracy.py::TestAccuracy::test_validate_fp16_transcendentals[sin] - AssertionError: Arrays are not almost equal up to 1 ULP (max difference is ...
= 9 failed, 22213 passed, 1559 skipped, 26186 deselected, 7 xfailed, 2 xpassed in 555.12s (0:09:15) =

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@r-devulap r-devulap added component: SIMD Issues in SIMD (fast instruction sets) code or machinery HWY features related to google Highway labels Oct 29, 2024
@github-actions github-actions Bot added the 01 - Enhancement label Oct 29, 2024
@seberg
seberg requested a review from seiko2plus November 7, 2024 09:41
seiko2plus
seiko2plus reviewed Nov 9, 2024
View reviewed changes
Comment thread numpy/_core/src/umath/loops_trigonometric.dispatch.cpp
"SIMD in general.");
npy_uint64 simd_maski;
hn::StoreMaskBits(f32, simd_mask, (uint8_t*)&simd_maski);
hn::StoreMaskBits(f32, simd_mask, (uint8_t *)&simd_maski);

@seiko2plus seiko2plus Nov 9, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better approach is needed for libc fallback to properly handle scalable extensions. One potential improvement could be introducing a new intrinsic, such as bool TestBit(MASK, int pos), which would also be endian-friendly. For now, I applied a quick fix below to address a big-endian bug, as passing a uint64_t as a uint8_t array obviously lead to accessing garbage bytes instead.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
seiko2plus
seiko2plus reviewed Nov 9, 2024
View reviewed changes
Comment thread numpy/_core/meson.build Resolved

Uh oh!

There was an error while loading. Please reload this page.

@seiko2plus

seiko2plus commented Nov 9, 2024

Copy link
Copy Markdown
Member

@r-devulap, Oh, my editor automatically reformatted the entire source code based on the NumPy clang-format configuration. Would you prefer that I revert these changes, or is this formatting acceptable for you?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@seiko2plus

seiko2plus commented Nov 9, 2024

Copy link
Copy Markdown
Member

All CI tests for s390x have passed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@seiko2plus
seiko2plus force-pushed the enable-vxe branch from a18b34b to b7ae869 Compare November 9, 2024 15:21
@seberg

seberg commented Nov 22, 2024

Copy link
Copy Markdown
Member

@r-devulap if you are happy about the changes please just put it in (I don't think the reformatting matters too much -- it's not that much).
2.2.0 is going to be branched very soon, it it seems reasonable to want to have this in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@seiko2plus Raghuveer Devulapalli
BUG: fix libc fallback for sine/cosine on ZARCH
ae04c39
@r-devulap
r-devulap force-pushed the enable-vxe branch from b7ae869 to bda2921 Compare November 22, 2024 16:58
Raghuveer Devulapalli
Re-enable VXE for sin/cos HWY implementation
bda2921
@r-devulap

r-devulap commented Nov 22, 2024

Copy link
Copy Markdown
Member Author

@r-devulap, Oh, my editor automatically reformatted the entire source code based on the NumPy clang-format configuration. Would you prefer that I revert these changes, or is this formatting acceptable for you?

Yeah no worries. This looks better anyways.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@r-devulap

r-devulap commented Nov 22, 2024

Copy link
Copy Markdown
Member Author

@r-devulap if you are happy about the changes please just put it in (I don't think the reformatting matters too much -- it's not that much). 2.2.0 is going to be branched very soon, it it seems reasonable to want to have this in.

yeah makes sense. I had to fix some rebase problems. But once the CI passes it should be good to go in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@seberg

seberg commented Nov 22, 2024

Copy link
Copy Markdown
Member

Let's put this in then, thanks @r-devulap and @seiko2plus.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@seberg
seberg merged commit be54bff into numpy:main Nov 22, 2024
@Sunny-Anand

Sunny-Anand commented Dec 13, 2024

Copy link
Copy Markdown

Not sure if this is having any impact here. google/highway#2409

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Sunny-Anand

Sunny-Anand commented Dec 13, 2024

Copy link
Copy Markdown

I can confirm that trying to install numpy>= 2.0.0 for python3.10 breaks on UBI-8 image.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@seiko2plus seiko2plus seiko2plus left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

01 - Enhancement component: SIMD Issues in SIMD (fast instruction sets) code or machinery HWY features related to google Highway

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@r-devulap @seiko2plus @seberg @Sunny-Anand
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.