The HSA Foundation has open sourced the following repositories on github
The AMD Sumatra prototype (webrev under review) can run using the OKRA interface to the HSAIL simulator. Similarly, graal with the new HSAIL backend (webrev under review) can run using this OKRA interface.
The HSAIL simulator and associated OKRA interface are currently limited to Linux. The build process for the OKRA interface will build both the simulator and the assembler from libHSAIL which is used to create BRIG binaries for the simulator. To build the simulator with its OKRA interface, follow the directions at https://github.com/HSAFoundation/Okra-Interface-to-HSAIL-Simulator#okra-interface-to-hsail-simulator. This procedure will build the assembler, simulator and okra interface. Run the indicated OKRA sanity tests on that page to confirm a proper build.
The sanity tests above are small tests with hand-coded HSAIL. They test both the C++ interface and the Java JNI interface. The following are a few other client that can be run against the Java OKRA interface to the HSAIL Simulator.
You can run junit tests in the graal hsail-enabled backend by doing the following steps. Your JAVA_HOME can be either JDK7 or a recent JDK8 binary (for example jdk8-b94)
Each graal junit test specifies a java method which takes a final int argument which is treated as a "workitemId". Also specified is a Range from 0 to N over which the workitemId will iterate. The method under test is dispatched twice:
The fields marked with @Result from the two dispatch instances are then compared for equality.
To be added: instructions for building and running Sumatra prototype thru Graal to the simulator.