diff --git a/doc/HSAEnablementOfLambdaBranch.md b/doc/HSAEnablementOfLambdaBranch.md new file mode 100644 index 0000000000000000000000000000000000000000..15e7fe9c1b71cee17b796a38ab8a95688cafa2c0 --- /dev/null +++ b/doc/HSAEnablementOfLambdaBranch.md @@ -0,0 +1,32 @@ +#HSAEnablementOfLambdaBranch +*Adding HSA Support to Aparapi lambda branch Updated Feb 28, 2014 by frost.g...@gmail.com* + +* [How to setup a HSA enabled Linux Platform](SettingUpLinuxHSAMachineForAparapi.md) +* [How to setup a HSA simulator on a Linux Platform](UsingAparapiLambdaBranchWithHSASimulator.md) + +Recently the HSA Foundation released their ‘Programmers Reference Manual’. This manual is for developers wishing to write code for upcoming HSA compatible devices, it describes the HSA Intermediate Language (HSAIL) along with its binary form (BRIG) and describes how code is expected to execute on a HSA enabled devices. + +In many ways we can think of HSAIL as we do Java bytecode. It is a common intermediate form that can be optimized at runtime to execute across a variety of future heterogeneous platforms. HSAIL will greatly simplify the development of software taking advantage of both sequential and parallel compute solutions. + +Now that the spec is out, we have started adding HSA support to the Aparapi lambda branch. We believe that HSA combined with the upcoming Java 8 feature lambda will be a natural way to express parallel algorithms which can be executed on the GPU via HSA. + +A HSA+Lambda enabled Aparapi will remove many of Aparapi's constraints. HSA allows all of the CPU's memory to be accessed directly from code running on the GPU. This means + +* We no longer need to move data from the host CPU to the GPU. +* We are no longer limited to the memory addressable from the GPU +* We can access multi-dim arrays efficiently +* We can access Java objects directly from the GPU. +These are all substantial benefits. + +In the existing code (early prototype) we provide access to HSA as a specific device type. + +So our ubiquitous 'squares' example will initially be written as: + + int in[] = ..// + int out[] = .../ + Device.hsa().forEach(in.length, (i)->{ + out[i] = in[i]*in[i]; + }); +You will obviously need a Java 8 compatible JDK ([https://jdk8.java.net/download.html](https://jdk8.java.net/download.html)) in your path. + +We also recommend using IntelliJ which has preliminary support for Java 8 lambda features. You can download the community edition of IntelliJ from [http://www.jetbrains.com/idea/](http://www.jetbrains.com/idea/) \ No newline at end of file diff --git a/doc/HSAEnablementOfLambdaBranchSidebar.md b/doc/HSAEnablementOfLambdaBranchSidebar.md index e8b2147b94a1c27b6d1a5a15b9410c7af754000f..3275452280bd0f065af3f2f1e9e0291927ba490f 100644 --- a/doc/HSAEnablementOfLambdaBranchSidebar.md +++ b/doc/HSAEnablementOfLambdaBranchSidebar.md @@ -1,6 +1,6 @@ #HSAEnablementOfLambdaBranchSidebar *Sidebar for HSAEnablementOfLambdaBranchAparapi* -[How to setup a HSA enabled Linux Platform](HowtosetupaHSAenabledLinuxPlatform.md) +[How to setup a HSA enabled Linux Platform](SettingUpLinuxHSAMachineForAparapi.md) -[How to setup a HSA simulator on a Linux Platform](HowtosetupaHSAsimulatoronaLinuxPlatform.md) +[How to setup a HSA simulator on a Linux Platform](UsingAparapiLambdaBranchWithHSASimulator.md) diff --git a/doc/README.md b/doc/README.md index 77a8d89127b165a9aed296ef8284f70b5dc2f5ea..280f18664896875ed8d55ee77783a1b09b967771 100644 --- a/doc/README.md +++ b/doc/README.md @@ -4,12 +4,12 @@ APARAPI Documentation | | | |----------------|------| | [PrivateMemorySpace](privatememoryspace.md)| Using `__private` memory space in Aparapi kernels. | -| [SettingUpLinuxHSAMachineForAparapi](settinguplinuxhsamachineforaparapi.md) | How to setup a Linux HSA machine for testing HSA enabled Aparapi | +| [SettingUpLinuxHSAMachineForAparapi](SettingUpLinuxHSAMachineForAparapi.md) | How to setup a Linux HSA machine for testing HSA enabled Aparapi | | [PossibleAparapiLambdaSyntaxOptions](PossibleAparapiLambdaSyntaxOptions.md) | Syntax suggestions for HSA enabled Aparapi | | [HSAEnablementOfLambdaBranchSidebar](HSAEnablementOfLambdaBranchSidebar.md)| Sidebar for HSAEnablementOfLambdaBranchAparapi| -| HSAEnablementOfLambdaBranch | Adding HSA Support to Aparapi lambda branch | -| UsingAparapiLambdaBranchWithHSASimulator | One-sentence summary of this page. | -| SettingUpLinuxHSAMachineForAparapiSidebar | Sidebar for SettingUpLinuxHSAMachineForAparapi | +| [HSAEnablementOfLambdaBranch](HSAEnablementOfLambdaBranch.md) | Adding HSA Support to Aparapi lambda branch | +| [UsingAparapiLambdaBranchWithHSASimulator](UsingAparapiLambdaBranchWithHSASimulator.md) | One-sentence summary of this page. | +| [SettingUpLinuxHSAMachineForAparapiSidebar](SettingUpLinuxHSAMachineForAparapiSidebar.md) | Sidebar for SettingUpLinuxHSAMachineForAparapi | | HSASidebar | | | AddingLambdasToAparapi | Adding Java 8 Lambda Support to Aparapi | | ProfilingKernelExecution | Using Aparapi's built in profiling APIs | diff --git a/doc/HowtosetupaHSAsimulatoronaLinuxPlatform.md b/doc/SettingUpLinuxHSAMachineForAparapi.md similarity index 95% rename from doc/HowtosetupaHSAsimulatoronaLinuxPlatform.md rename to doc/SettingUpLinuxHSAMachineForAparapi.md index ccf7a4de62eaddf2b71ca785b88d9c50e533ebbc..edf564be4e2766edb8db14ff4a4c36538af987b1 100644 --- a/doc/HowtosetupaHSAsimulatoronaLinuxPlatform.md +++ b/doc/SettingUpLinuxHSAMachineForAparapi.md @@ -1,6 +1,14 @@ #SettingUpLinuxHSAMachineForAparapi *How to setup a Linux HSA machine for testing HSA enabled Aparapi Updated May 22, 2014 by frost.g...@gmail.com* +* HSA Videos + * [http://www.youtube.com/watch?v=5ntILiXTuhE](http://www.youtube.com/watch?v=5ntILiXTuhE) + * [http://www.youtube.com/watch?v=caEPq4KvTTA](http://www.youtube.com/watch?v=caEPq4KvTTA) +* HSA Articles + * [http://developer.amd.com/resources/heterogeneous-computing/what-is-heterogeneous-computing/](http://developer.amd.com/resources/heterogeneous-computing/what-is-heterogeneous-computing/) +* HSA Foundation + * [https://github.com/HSAFoundation](https://github.com/HSAFoundation) + ##Introduction Now that HSA hardware is generally available I figured it was time to describe how to setup a HSA enabled Linux platform so that it can run Aparapi. diff --git a/doc/SettingUpLinuxHSAMachineForAparapiSidebar.md b/doc/SettingUpLinuxHSAMachineForAparapiSidebar.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/doc/HowtosetupaHSAenabledLinuxPlatform.md b/doc/UsingAparapiLambdaBranchWithHSASimulator.md similarity index 100% rename from doc/HowtosetupaHSAenabledLinuxPlatform.md rename to doc/UsingAparapiLambdaBranchWithHSASimulator.md