Skip to content

Commit b9e952d

Browse files
committed
HSA 1.0 Final
0 parents  commit b9e952d

17 files changed

+5903
-0
lines changed

LICENSE.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Copyright � 2014 Advanced Micro Devices, Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in binary form, with or without modification, are permitted provided that the following are met:
5+
6+
You must reproduce the above copyright notice.
7+
8+
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific, prior, written permission from at least the copyright holder.
9+
10+
You must include the following terms in your license and/or other materials provided with the software.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13+
14+
Without limiting the foregoing, the software may implement third party technologies for which you must obtain licenses from parties other than AMD. You agree that AMD has not obtained or conveyed to you, and that you shall be responsible for obtaining the rights to use and/or distribute the applicable underlying intellectual property rights related to the third party technologies. These third party technologies are not licensed hereunder.
15+
16+
If you use the software (in whole or in part), you shall adhere to all applicable U.S., European, and other export laws, including but not limited to the U.S. Export Administration Regulations ("EAR") (15 C.F.R Sections 730-774), and E.U. Council Regulation (EC) No 428/2009 of 5 May 2009. Further, pursuant to Section 740.6 of the EAR, you hereby certify that, except pursuant to a license granted by the United States Department of Commerce Bureau of Industry and Security or as otherwise permitted pursuant to a License Exception under the U.S. Export Administration Regulations ("EAR"), you will not (1) export, re-export or release to a national of a country in Country Groups D:1, E:1 or E:2 any restricted technology, software, or source code you receive hereunder, or (2) export to Country Groups D:1, E:1 or E:2 the direct product of such technology or software, if such foreign produced direct product is subject to national security controls as identified on the Commerce Control List (currently found in Supplement 1 to Part 774 of EAR). For the most current Country Group listings, or for additional information about the EAR or your obligations under those regulations, please refer to the U.S. Bureau of Industry and Security's website at http://www.bis.doc.gov/.

README.md

Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
### AMD Heterogeneous System Architecture HSA - HSA Runtime release for AMD 7000 series APUs
2+
3+
This package includes the user-mode API interfaces and libraries necessary for host applications to launch compute kernels to available HSA kernel agent. This version implements the 1.0 Final HSA Runtime Programmer's Reference Manual and targets AMD 7000 series APUs on supported platforms. The package is compatible with the 1.0 version of the HSA driver set. See the HSA-docs repository at https://github.com/HSAFoundation/HSA-docs/wiki for more information regarding target platforms, documentation and usage.
4+
5+
#### Package Contents
6+
7+
* hsa.h - Header file exposing the API interface of the HSA runtime's core functionality.
8+
* hsa_ext_image.h - Header file exposing the API interface of the HSA runtime's image extension.
9+
* hsa_ext_finalize.h - Header file exposing the API interface of the HSA runtime's HSAIL Finalization extension.
10+
* libhsa-runtime64.so.1 - The 64-bit version of AMD's implementation of the hsa runtime's core functionality.
11+
* libhsa-runtime-ext64.so.1 - The 64-bit version of AMD's implementation of the hsa runtime's shared library's extended finalizer and images functionality.
12+
* vector_copy sample - A simple HSA sample illustrating how to load a BRIG module from an ELF container, create and finalize a HSA program and dispatch the resulting HSA kernel.
13+
14+
#### Target Platform
15+
16+
This release is intended for use with any hardware configuration that contains an AMD 7000 series APU. The motherboards must support the FM2+ socket, run the latest BIOS version and have the IOMMU enabled in the BIOS. The following is a reference hardware configuration that was used for testing purposes:
17+
18+
* APU: AMD A10-7850K APU
19+
* Motherboard: ASUS A88X-PRO motherboard (ATX form factor)
20+
* OS: Ubuntu 14.04, Fedora 21
21+
* No discrete GPU present in the system
22+
23+
Refer to the https://github.com/HSAFoundation/HSA-docs/wiki/HSA-Platforms-&-Installation wiki page for additional information on platform support.
24+
25+
#### Installing and configuring the HSA Runtime
26+
27+
Download the HSA-Runtime-AMD from the repository: git clone https://github.com/HSAFoundation/HSA-Runtime-AMD.git
28+
29+
Install the appropriate package for the target operating system (Debian on Ubuntu 14.04 or RPM for Fedora 21). The libraries, header files and samples will be installed in the /opt/hsa directory of the system.
30+
31+
Ubuntu 14.04:
32+
33+
dpkg -i hsa-runtime_1.0_amd64.deb
34+
35+
Fedora 21:
36+
37+
rpm -i hsa-runtime-1.0-0.fc21.x86_64.rpm
38+
39+
Applications utilizing the HSA runtime must specify how the runtime is utilized, either as an explicitly loaded shared object or a library that is implicitly linked, and the runtime must be installed correctly for the application to appropriately utilize it. Please refer each application's specific documentation regarding runtime installation.
40+
41+
#### HSA Runtime / HSA Driver compatibility
42+
43+
The HSA Runtime interacts with the HSA drivers using an interface library, libhsakmt.so. This library is packaged with the HSA driver set, and is available in the HSA-Drivers-Linux-AMD repository at this link https://github.com/HSAFoundation/HSA-Drivers-Linux-AMD/tree/master/kfd-1.0/libhsakmt. The HSA Runtime is dynamically linked with this library, which must be compatible with both the runtime and the HSA driver to properly work. Any executable that uses the HSA runtime library will require that the directory containing a compatible version of libhsakmt.so is specified in the LD_LIBRARY_PATH environment variable.
44+
45+
#### Running the sample - vector_copy ####
46+
47+
A simple sample, vector_copy, is provided in the samples directory of this repository.To build the sample, simply issue the 'make' command in the sample directory. This will create the vector_copy host executable.
48+
49+
When executed, vector_copy will load the vector_copy.brig BRIG file, finalize the associated kernel and execute it on an available HSA kernel agent. The libhsa-runtime, libhsa-runtime-ext and libhsakmt shared object library directories must be in the LD_LIBRARY_PATH environment variable.
50+
51+
A successful execution will print messages similar to the following:
52+
53+
* Initializing the hsa runtime succeeded.
54+
* Getting a gpu agent succeeded.
55+
* Querying the agent name succeeded.
56+
* The agent name is Spectre.
57+
* Querying the agent maximum queue size succeeded.
58+
* The maximum queue size is 131072.
59+
* Creating the queue succeeded.
60+
* Create the program succeeded.
61+
* Adding the brig module to the program succeeded.
62+
* Query the agents isa succeeded.
63+
* Finalizing the program succeeded.
64+
* Destroying the program succeeded.
65+
* Create the executable succeeded.
66+
* Loading the code object succeeded.
67+
* Freeze the executable succeeded.
68+
* Extract the symbol from the executable succeeded.
69+
* Extracting the symbol from the executable succeeded.
70+
* Extracting the kernarg segment size from the executable succeeded.
71+
* Extracting the group segment size from the executable succeeded.
72+
* Extracting the private segment from the executable succeeded.
73+
* Creating a HSA signal succeeded.
74+
* Registering argument memory for input parameter succeeded.
75+
* Registering argument memory for output parameter succeeded.
76+
* Finding a kernarg memory region succeeded.
77+
* Allocating kernel argument memory buffer succeeded.
78+
* Dispatching the kernel succeeded.
79+
* Passed validation.
80+
* Destroying the signal succeeded.
81+
* Destroying the executable succeeded.
82+
* Destroying the code object succeeded.
83+
* Destroying the queue succeeded.
84+
* Shutting down the runtime succeeded.
85+
86+
An unsuccessful execution will indicate the step that failed.
87+
88+
#### Q & A
89+
1. **I keep getting an error saying *'error while loading shared libraries: libhsakmt.so.1: cannot open shared object file: No such file or directory'*?**
90+
* The libhsakmt.so.1 library directory isn't in the LD\_LIBRARY\_PATH or the version of libhsamkt.so.1 is incorrect.
91+
92+
2. **I can initialize the runtime, using hsa\_init, but there is no GPU device?**
93+
* The /dev/kfd device is not properly initialized or it has the wrong permissions assigned to it. The command 'ls -l /dev/kfd' will list the permission on the kfd device. The device /dev/kfd should exist and have 0666 permissions assigned to it. Consult the HSA driver documentation for information on how to configure the kfd device.
94+
95+
3. **The kernels that I create using CLOC version 0.7.5 don't work with this runtime. Why is that?**
96+
* The 0.7.5 version of CLOC generates 1.0 Provisional HSAIL, which is incompatible with the 1.0 Final version of the runtime. CLOC and other HSAIL related tools will need to be updated to the final HSAIL specification before they are compatible.
97+
98+
#### Unimplemented functionality
99+
100+
* alloca
101+
* scall
102+
* debugtrap
103+
* Indirect calls
104+
* Exception operations; exceptions do not occur. HSAIL operations (enablebreakexceptions, enabledetectexceptions, cleardetectexcept getdetectexcept, setdetectexcept) are not implemented.
105+
* Aggregate initializers (new functionality in 1.0 Final)
106+
* Image initializers (sampler initializers work)
107+
* f16 operations on Kaveri hardware
108+
* Flat private
109+
* The following queries are not implemented:
110+
** hsa_code_symbol_get_info: HSA_CODE_SYMBOL_INFO_VARIABLE_ALIGNMENT, HSA_CODE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION
111+
** hsa_executable_symbol_get_info: HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALIGNMENT, HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_OBJECT, HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION
112+
** hsa_isa_get_info: HSA_ISA_INFO_CALL_CONVENTION_COUNT, HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONT_SIZE, HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONTS_PER_COMPUTE_UNIT
113+
* The following queries are not implemented:
114+
* hsa_code_symbol_get_info: HSA_CODE_SYMBOL_INFO_VARIABLE_ALIGNMENT, HSA_CODE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION
115+
* hsa_executable_symbol_get_info: HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALIGNMENT, HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_OBJECT, HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION
116+
* hsa_isa_get_info: HSA_ISA_INFO_CALL_CONVENTION_COUNT, HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONT_SIZE, HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONTS_PER_COMPUTE_UNIT
117+
118+
#### Known Issues
119+
120+
* Signals do not support multiple concurrent HOST waiters unless the the environment variable HSA_ENABLE_INTTERUPT=0.
121+
* hsa_agent_get_exception_policies is not implemented.
122+
* Image import/export/copy/fill only support image created with memory from host accessible region.
123+
* Coarse grain memory usage may claim one user mode queue internally to do memory copy and reduce the number of max queue that can be created.
124+
* hsa_memory_allocate can an return invalid status when an allocation size of 0 bytes is specified.
125+
* hsa_system_get_extension_table is not implemented for HSA_EXTENSION_AMD_PROFILER.
126+
* hsa_ext_image_copy only support source and destination with the same image format. It does not support SRGBA to linear RGBA conversion and vice versa.
127+
* Acquire and release only synchronize on segment of the operation, matchng SysArch 1.0 provisonal.
128+
* hsa_ext_program_finalize has the following restrictions:
129+
** Programs that contain calls to functions defined in a different module are not supported.
130+
** Programs with external global/readonly variables (ones that have no definition) are not supported.
131+
** When the "-g -O0" options (debugger enabled) are specified, only programs with a single module that contains a single kernel are supported.
132+
* Programs that contain calls to functions defined in a different module are not supported.
133+
* Programs with external global/readonly variables (ones that have no definition) are not supported.
134+
* When the "-g -O0" options (debugger enabled) are specified, only programs with a single module that contains a single kernel are supported.
135+
* Global/readonly variables only work with online compilation.
136+
* Serialization/deserialization only works without global/readonly variables.
137+
* Code objects can only be loaded once.
138+
139+
#### Disclaimer
140+
141+
The information contained herein is for informational purposes only, and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document. Terms and limitations applicable to the purchase or use of AMD's products are as set forth in a signed agreement between the parties or in AMD's Standard Terms and Conditions of Sale.
142+
143+
AMD, the AMD Arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.
144+
145+
Copyright (c) 2014 Advanced Micro Devices, Inc. All rights reserved.
146+
147+
University of Illinois/NCSA
148+
Open Source License
149+
150+
Copyright (c) 2010 Apple Inc.
151+
All rights reserved.
152+
153+
Developed by:
154+
155+
LLDB Team
156+
157+
http://lldb.llvm.org/
158+
159+
Permission is hereby granted, free of charge, to any person obtaining a copy of
160+
this software and associated documentation files (the "Software"), to deal with
161+
the Software without restriction, including without limitation the rights to
162+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
163+
of the Software, and to permit persons to whom the Software is furnished to do
164+
so, subject to the following conditions:
165+
166+
* Redistributions of source code must retain the above copyright notice,
167+
this list of conditions and the following disclaimers.
168+
169+
* Redistributions in binary form must reproduce the above copyright notice,
170+
this list of conditions and the following disclaimers in the
171+
documentation and/or other materials provided with the distribution.
172+
173+
* Neither the names of the LLDB Team, copyright holders, nor the names of
174+
its contributors may be used to endorse or promote products derived from
175+
this Software without specific prior written permission.
176+
177+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
178+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
179+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
180+
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
181+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
182+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
183+
SOFTWARE.
184+
185+
Open source files:
186+
DataBuffer.h
187+
DataBufferHeap.cpp
188+
DataBufferHeap.h
189+
DataEncoder.cpp
190+
DataEncoder.h
191+
DataExtractor.cpp
192+
DataExtractor.h
193+
DataTypes.h
194+
Dwarf.cpp
195+
Dwarf.h
196+
DWARFDebugLine.cpp
197+
DWARFDebugLine.h
198+
DWARFDefines.cpp
199+
DWARFDefines.h
200+
File.cpp
201+
File.h
202+
Flags.h
203+
lldb-dwarf.h
204+
lldb-enumerations.h
205+
lldb-types.h
206+
SmallVector.cpp
207+
SmallVector.h
208+
Stream.cpp
209+
Stream.h
210+
StreamBuffer.h
211+
StreamFile.cpp
212+
StreamFile.h
213+
SwapByteOrder.h
214+
type_traits.h
215+
216+
ANTLR 4 License
217+
[The BSD License]
218+
Copyright (c) 2012 Terence Parr and Sam Harwell
219+
All rights reserved.
220+
221+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
222+
223+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
224+
225+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
226+
227+
Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
228+
229+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
230+
2.79 MB
Binary file not shown.

0 commit comments

Comments
 (0)