harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiutao Nie (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6517) New optimization and interface for either automatically or manually vectorizing Java programs with SSE instructions
Date Wed, 26 May 2010 03:06:33 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871489#action_12871489
] 

Jiutao Nie commented on HARMONY-6517:
-------------------------------------

Yes, this will be better.  I've updated the javavect.patch.  Now the
code becomes:

+    if (Log::isEnabled () && num_to_be_vectorized)
+      {
+        ir_manager.getMethodDesc().printFullName (Log::out ());
+        Log::out() << ": " << num_to_be_vectorized
+                   << " loop(s) to be vectorized"
+                   << std::endl;
+      }


Yes, this patch also includes several bug fixes relating to encoding
longer instructions, which are found during the vectorization work,
but not specific to it.  I'll keep your advice in mind in future.

2010/5/25 Mark Hindess (JIRA) <jira@apache.org>:



> New optimization and interface for either automatically or manually vectorizing Java
programs with SSE instructions
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6517
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6517
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>         Environment: OS: Linux or Windows
> Hardware: X86 or X86_64 with SSE4.2
>            Reporter: Jiutao Nie
>            Priority: Minor
>         Attachments: javavect.patch, jvi.patch, jvi_basic.java
>
>
> The patch file "javavect.patch" for DRLVM provides new features for vectorizing Java
programs either automatically or manually.  The work consists of four parts:
>     1) IR extension for vector types and operators (middle-end);
>     2) vector instruction (SSE) description and code generation (back-end);
>     3) optimization pass of automatic vectorization for loops (middle-end);
>     4) Java vector interface (JVI, see below) translator for manually writing vectorized
Java programs with JVI (front-end).
> Parts 1) and 2) provides the basic facility for internally representing vectorized code
and generating SSE instructions.  Based on that, part 3) provides an automatic approach and
part 4) provides a manual approach for vectorizing Java programs.
> The patch file "jvi.patch" for vmmagic provides a Java class library for programmers
to write vectorized Java program explicitly.  It contains 6 classes representing the types
of vectors of 8-, 16-, 32- and 64-bit integers, and 32- and 64-bit floating point numbers.
 Each class contains appropriate methods representing supported vector operators on that type.
 The JVI class references and method callings in a Java program are translated into appropriate
internal vector IR by the extended front-end, i.e. the work of part 4).
> The Java source file "jvi_basic.java" provides a simple test suite for JVI, covering
all implemented JVI operations.  It can also be used as examples of the usage of JVI.
> **** Hardware requirement ****
> X86 or X86_64 with SSE4.2 instruction set
> **** Usage of automatic vectorization ****
> The patch file contains two new configuration files: server_autovect.emconf and server_static_autovect.emconf,
which are copied from server.emconf and servre_static.emconf, and inserted "autovect" optimization
pass into their optimization paths.  To try automatic vectorization, only need to add one
of the following arguments: "-Xem:server_autovect" or "-Xem:server_static_autovect" to run
the VM.
> **** Usage of JVI ****
> Write programs with JVI (see jvi_basic.java), compile them and run them with the argument
"-Xem:server_static" (This is must because the JVI code cannot be executed without being translated
into the vector IR by Jitrino's optimizing compiler).
> **** Performance improvement ****
> The performance of two computation intensive workloads (LU and FFT) is improved by 30%
to 100%.
> **** Testing of the patch based on the Harmony revision 935818 (2010-04-20) ****
> Automatic vectorization testing with SPECjvm2008:
>   * Argument: -Xem:server_static_autovect
>   * On 64-bit linux machine: All workloads except crypto.aes, derby and xml.transform
have passed.
>   * On 32-bit linux machine: All workloads except derby have passed.
>   * All the above failed workloads also fail when autovect is disabled (-Xem:server_static),
meaning that the failures are caused by bugs of the original code base.
>   * Argument: -Xem:server_autovect
>   * On both 64-bit and 32-bit linux machines: All workloads except xml.transform and
serial have passed.
>   * All the above failed workloads also fail when autovect is disabled (-Xem:server),
meaning that the failures are caused by bugs of the original code base.
> JVI-based vectorization testing with jvi_basic.java:
>   * Argument: -Xem:server_static
>   * On both 64-bit and 32-bit linux machines: all test cases have passed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message