Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test VectorAPI with TornadoNative types through Memory Segments for 64 to 512Bit vector #351

Merged

Conversation

mikepapadim
Copy link
Member

@mikepapadim mikepapadim commented Mar 11, 2024

Description

This is a follow up PR to #350 .

The PR adds unit-tests to check the connection between TornadoVM native types (invoking the getSegment) and Java Vector API.
It adds the following tests:

 test64BitVector   ->  Species[float, 2, S_64_BIT]
 test128BitVector  ->  Species[float, 4, S_128_BIT]
 test256BitVector  ->  Species[float, 8, S_256_BIT]
 test512BitVector  ->  Species[float, 16, S_512_BIT]

Backend/s tested

Mark the backends affected by this PR.

  • OpenCL
  • PTX
  • SPIRV

OS tested

Mark the OS where this PR is tested.

  • Linux
  • OSx
  • Windows

How to test the new patch?

make 
tornado-test -V uk.ac.manchester.tornado.unittests.vector.api.TestVectorAPI

@mikepapadim mikepapadim self-assigned this Mar 11, 2024
@mikepapadim mikepapadim changed the title Add unit-test for using VectorAPI with TornadoNative types through segments Add unit-test for using VectorAPI with TornadoNative types through Memory Segments Mar 11, 2024
@mikepapadim mikepapadim changed the title Add unit-test for using VectorAPI with TornadoNative types through Memory Segments Add unit-test for using VectorAPI with TornadoNative types directly through Memory Segments Mar 13, 2024
@mikepapadim mikepapadim changed the title Add unit-test for using VectorAPI with TornadoNative types directly through Memory Segments Add unit-tests for using VectorAPI with TornadoNative types directly through Memory Segments with 64 to 512Bit vector Mar 17, 2024
@mikepapadim mikepapadim changed the title Add unit-tests for using VectorAPI with TornadoNative types directly through Memory Segments with 64 to 512Bit vector Add unit-tests for using VectorAPI with TornadoNative types through Memory Segments with 64 to 512Bit vector Mar 17, 2024
@mikepapadim mikepapadim changed the title Add unit-tests for using VectorAPI with TornadoNative types through Memory Segments with 64 to 512Bit vector Add unit-tests for VectorAPI with TornadoNative types with Memory Segments with 64 to 512Bit vector Mar 17, 2024
@jjfumero
Copy link
Member

By looking at the description, the PR adds unit-tests to check the connection between TornadoVM native types (invoking the getSegment) and Java Vector API. In this case, we don't use any of the supported backends. However, you test it for OpenCL. Can you expand?

@jjfumero
Copy link
Member

Tests passing on Apple M2 (CPU):

$ tornado-test --threadInfo -V uk.ac.manchester.tornado.unittests.vector.api.TestVectorAPI

WARNING: Using incubator modules: jdk.incubator.vector

Species[float, 2, S_64_BIT]
Species[float, 4, S_128_BIT]
Species[float, 8, S_256_BIT]
Species[float, 16, S_512_BIT]
Test: class uk.ac.manchester.tornado.unittests.vector.api.TestVectorAPI
	Running test: test64BitVectors           ................  [PASS] 
	Running test: test128BitVectors          ................  [PASS] 
	Running test: test256BitVectors          ................  [PASS] 
	Running test: test512BitVectors          ................  [PASS] 
Test ran: 4, Failed: 0, Unsupported: 0

@mikepapadim mikepapadim changed the title Add unit-tests for VectorAPI with TornadoNative types with Memory Segments with 64 to 512Bit vector Test VectorAPI with TornadoNative types through Memory Segments for 64 to 512Bit vector Mar 18, 2024
@mikepapadim
Copy link
Member Author

This is ready, there are not other pending changes

@jjfumero jjfumero merged commit 8854021 into beehive-lab:develop Mar 21, 2024
2 checks passed
@mikepapadim mikepapadim deleted the mikepapadim/vector_api_example branch March 21, 2024 13:40
jjfumero added a commit to jjfumero/TornadoVM that referenced this pull request Mar 27, 2024
Improvements
~~~~~~~~~~~~~~~~~~

- `beehive-lab#344 <https://github.com/beehive-lab/TornadoVM/pull/344>`_: Support for Multi-threaded Execution Plans.
- `beehive-lab#347 <https://github.com/beehive-lab/TornadoVM/pull/347>`_: Enhanced examples.
- `beehive-lab#350 <https://github.com/beehive-lab/TornadoVM/pull/350>`_: Obtain internal memory segment for the Tornado Native Arrays without the object header.
- `beehive-lab#357 <https://github.com/beehive-lab/TornadoVM/pull/357>`_: API extensions to query and apply filters to backends and devices from the ``TornadoExecutionPlan``.
- `beehive-lab#359 <https://github.com/beehive-lab/TornadoVM/pull/359>`_: Support Factory Methods for FFI-based array collections to be used/composed in TornadoVM Task-Graphs.

Compatibility
~~~~~~~~~~~~~~~~~~

- `beehive-lab#351 <https://github.com/beehive-lab/TornadoVM/pull/351>`_: Compatibility of TornadoVM Native Arrays with the Java Vector API.
- `beehive-lab#352 <https://github.com/beehive-lab/TornadoVM/pull/352>`_: Refactor memory limit to take into account primitive types and wrappers.
- `beehive-lab#354 <https://github.com/beehive-lab/TornadoVM/pull/354>`_: Add DFT-sample benchmark in FP32.
- `beehive-lab#356 <https://github.com/beehive-lab/TornadoVM/pull/356>`_: Initial support for Windows 11 using Visual Studio Development tools.
- `beehive-lab#361 <https://github.com/beehive-lab/TornadoVM/pull/361>`_: Compatibility with the SPIR-V toolkit v0.0.4.
- `beehive-lab#366 <https://github.com/beehive-lab/TornadoVM/pull/363>`_: Level Zero JNI Dependency updated to 0.1.3.

Bug Fixes
~~~~~~~~~~~~~~~~~~

- `beehive-lab#346 <https://github.com/beehive-lab/TornadoVM/pull/346>`_: Computation of local-work group sizes for the Level Zero/SPIR-V backend fixed.
- `beehive-lab#360 <https://github.com/beehive-lab/TornadoVM/pull/358>`_: Fix native tests to check the JIT compiler for each backend.
- `beehive-lab#355 <https://github.com/beehive-lab/TornadoVM/pull/355>`_: Fix custom exceptions when a driver/device is not found.
@jjfumero jjfumero mentioned this pull request Mar 27, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants