Forum Stats

  • 3,726,724 Users
  • 2,245,247 Discussions
  • 7,852,376 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

AVX/AVX2 vector operations in OpenJ9

leviya
leviya Member Posts: 8
edited December 2017 in New To Java

Hi,

At JavaOne 2017 Intel presented very interesting approach of incorporating AVX2 vector instructions in HotSpot. This will allow Machine Learning and other data-intensive Java applications to utilize specialized AVX/AVX2 instructions to achieve much better performance.

Will OpenJ9 users benefit from this Intel/Oracle collaboration and upcoming Intel's OpenJDK-based vector library

Thank you

Answers

  • Unknown
    edited December 2017
    At JavaOne 2017 Intel presented very interesting approach of incorporating AVX2 vector instructions in HotSpot. This will allow Machine Learning and other data-intensive Java applications to utilize specialized AVX/AVX2 instructions to achieve much better performance.Will OpenJ9 users benefit from this Intel/Oracle collaboration and upcoming Intel's OpenJDK-based vector library

    It's not clear what you mean by 'benefit'.

        

    Do you mean can you actually run/incorporate that vector library into your Java applications? Then yes. IBM has had Java vector libraries available for over a decade.

    Do you mean will you get better performance? Hard to say since performance almost ALWAYS depends on exactly 1) WHAT you are doing and 2) HOW you are doing it.

    SIMD (Single Instruction Multiple Data) has been available in Intels's (and other) cpus for over a decade.

    But in those cpus the data has to be in the cpu memory - typicallly a set of large (64/128 bit) floating point registers and you have to load those registers with the data from another source such as main memory.

    So the amount of data that can be operated on in parallel is pretty limited.

    Contrast that with how the latest generation of graphics cards, such as NVIDIA, implement SIMD:

    https://developer.nvidia.com/cuda-zone

    In GPU-accelerated applications, the sequential part of the workload runs on the CPU – which is optimized for single-threaded performance – while the compute intensive portion of the application runs on thousands of GPU cores in parallel. When using CUDA, developers program in popular languages such as C, C++, Fortran, Python and MATLAB and express parallelism through extensions in the form of a few basic keywords.

    There are no Java libraries available that support the use of those graphics cards for deep learning applications.

    As before the slowest part of the process is loading the data to the graphics card and then moving results back to the cpu/memory main system.

    Except those graphics contain gigabytes of memory that can be used in those SIMD operations. CPU and cache memory doesn't even to extend to the GB range.

    So you don't have to wait for that library to start getting involved in deep learning. You can get a lower end NVIDIA card for a couple hundred dollars and one of the free Java libraries that can work with it.

    You can also use one of the free Java libraries that use C DLLs to interface to the graphics card.

This discussion has been closed.