Skip to content

Commit b4beb59

Browse files
committed
HSA 1.0.3
1 parent 8c9999d commit b4beb59

27 files changed

+958
-72
lines changed

README.md

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,42 @@
1-
### AMD Heterogeneous System Architecture HSA - HSA Runtime release for AMD 7000 series APUs
1+
### AMD Heterogeneous System Architecture HSA - HSA Runtime release for AMD Kaveri & Carrizo APUs
22

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.
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 Kaveri & Carrizo series APUs on supported platforms. The package is compatible with the 1.6 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.
44

55
#### Package Contents
66

77
* hsa.h - Header file exposing the API interface of the HSA runtime's core functionality.
88
* hsa_ext_image.h - Header file exposing the API interface of the HSA runtime's image extension.
99
* hsa_ext_finalize.h - Header file exposing the API interface of the HSA runtime's HSAIL Finalization extension.
10+
* amd_hsa_common.h - AMD internal interface. This file is subject to change without notice.
11+
* amd_hsa_elf.h - AMD internal interface. This file is subject to change without notice.
12+
* amd_hsa_kernel_code.h - AMD internal interface. This file is subject to change without notice.
13+
* amd_hsa_queue.h - AMD internal interface. This file is subject to change without notice.
14+
* amd_hsa_signal.h - AMD internal interface. This file is subject to change without notice.
1015
* 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-
* libhsakmt.so.1 - The 64-bit version of the thunk interface, compatible with the 1.4 version of the HSA-Drivers-Linux-AMD driver set.
16+
* libhsa-runtime-image64.so.1 - The 64-bit version of AMD's implementation of the hsa runtime's image extension.
17+
* libhsa-runtime-finalize64.so.1 - The 64-bit version of AMD's implementation of the hsa runtime's finalizer extension.
18+
* libhsa-runtime-tools64.so.1 - The 64-bit version of HSA debug, trace and profiling support tools for AMD hardware.
1319
* 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.
1420

15-
#### Target Platform
16-
17-
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:
18-
19-
* APU: AMD A10-7850K APU
20-
* Motherboard: ASUS A88X-PRO motherboard (ATX form factor)
21-
* OS: Ubuntu 14.04, Fedora 21
22-
* No discrete GPU present in the system
23-
24-
Refer to the https://github.com/HSAFoundation/HSA-docs/wiki/HSA-Platforms-&-Installation wiki page for additional information on platform support.
25-
2621
#### Installing and configuring the HSA Runtime
2722

2823
Download the HSA-Runtime-AMD from the repository: git clone https://github.com/HSAFoundation/HSA-Runtime-AMD.git
2924

30-
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.
25+
Install the appropriate package for the target operating system. The libraries, header files and samples will be installed in the /opt/hsa directory of the system.
3126

3227
Ubuntu 14.04:
3328

34-
dpkg -i hsa-runtime_1.0_amd64.deb
29+
dpkg -i hsa-runtime_1.0.3_amd64.deb
3530

3631
Fedora 21:
3732

38-
rpm -i hsa-runtime-1.0-0.fc21.x86_64.rpm
33+
Support for Fedora 21 is not provided in this release or in the associated driver release
3934

4035
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.
4136

4237
#### HSA Runtime / HSA Driver compatibility
4338

44-
The HSA Runtime interacts with the HSA drivers using an interface library, libhsakmt.so.1. 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. The version of libhsakmt.so.1 compatible with this runtime is available in the 1.4 release of the driver set.
39+
The HSA Runtime interacts with the HSA drivers using an interface library, libhsakmt.so.1. 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. The version of libhsakmt.so.1 compatible with this runtime is available in the 1.6 release of the driver set.
4540

4641
#### Running the sample - vector_copy ####
4742

@@ -96,9 +91,6 @@ An unsuccessful execution will indicate the step that failed.
9691
3. **The kernels that I create using CLOC version 0.7.5 don't work with this runtime. Why is that?**
9792
* 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.
9893

99-
4. **On Fedora 21 queue creation is failing and I get a dmesg error with the following entry "avc: denied { execheap }".**
100-
* Fedora 21 comes with the SELinux enabled by default. To create an HSA queue, users must be able to set allocated memory executable. To allow a user to do this, disable the SELinux restriction with the following command - `setsebool -P selinuxuser_execheap 1`
101-
10294
#### Unimplemented functionality
10395

10496
* alloca
@@ -114,16 +106,11 @@ An unsuccessful execution will indicate the step that failed.
114106

115107
#### Known Issues
116108

117-
* Error handling/reporting during AQL packet processing or execution is not fully supported, as a result the spread of failures may not be localized to the queue.
118-
* Power-efficient signals (default operation) have some race conditions when used in multiple queues or multiple threads and require HSA_ENABLE_INTERRUPT=0 to eliminate them.
119109
* Max total coarse grain region limit is 8GB.
120110
* hsa_agent_get_exception_policies is not implemented.
121111
* Image import/export/copy/fill only support image created with memory from host accessible region.
122112
* hsa_system_get_extension_table is not implemented for HSA_EXTENSION_AMD_PROFILER.
123113
* hsa_ext_program_finalize has the following restrictions:
124-
* Programs that contain calls to functions defined in a different module are not supported.
125-
* When the "-g -O0" options (debugger enabled) are specified, only programs with a single module that contains one or more kernel are supported.
126-
* When the "-g -O0" options (debugger enabled) are specified, global variable debug information is not generated.
127114
* Control directives provided in a hsa_ext_program_finalize call are ignored.
128115

129116
### Disclaimer
-2.89 MB
Binary file not shown.

include/amd_hsa_common.h

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
////////////////////////////////////////////////////////////////////////////////
2+
//
3+
// Copyright 2014 ADVANCED MICRO DEVICES, INC.
4+
//
5+
// AMD is granting you permission to use this software and documentation (if
6+
// any) (collectively, the "Materials") pursuant to the terms and conditions of
7+
// the Software License Agreement included with the Materials. If you do not
8+
// have a copy of the Software License Agreement, contact your AMD
9+
// representative for a copy.
10+
//
11+
// You agree that you will not reverse engineer or decompile the Materials, in
12+
// whole or in part, except as allowed by applicable law.
13+
//
14+
// WARRANTY DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF
15+
// ANY KIND. AMD DISCLAIMS ALL WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY,
16+
// INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
17+
// FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON - INFRINGEMENT, THAT THE
18+
// SOFTWARE WILL RUN UNINTERRUPTED OR ERROR - FREE OR WARRANTIES ARISING FROM
19+
// CUSTOM OF TRADE OR COURSE OF USAGE. THE ENTIRE RISK ASSOCIATED WITH THE USE
20+
// OF THE SOFTWARE IS ASSUMED BY YOU. Some jurisdictions do not allow the
21+
// exclusion of implied warranties, so the above exclusion may not apply to You.
22+
//
23+
// LIMITATION OF LIABILITY AND INDEMNIFICATION: AMD AND ITS LICENSORS WILL NOT,
24+
// UNDER ANY CIRCUMSTANCES BE LIABLE TO YOU FOR ANY PUNITIVE, DIRECT,
25+
// INCIDENTAL, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM USE OF
26+
// THE SOFTWARE OR THIS AGREEMENT EVEN IF AMD AND ITS LICENSORS HAVE BEEN
27+
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall AMD's total
28+
// liability to You for all damages, losses, and causes of action (whether in
29+
// contract, tort (including negligence) or otherwise) exceed the amount of $100
30+
// USD. You agree to defend, indemnify and hold harmless AMD and its licensors,
31+
// and any of their directors, officers, employees, affiliates or agents from
32+
// and against any and all loss, damage, liability and other expenses (including
33+
// reasonable attorneys' fees), resulting from Your use of the Software or
34+
// violation of the terms and conditions of this Agreement.
35+
//
36+
// U.S.GOVERNMENT RESTRICTED RIGHTS: The Materials are provided with
37+
// "RESTRICTED RIGHTS." Use, duplication, or disclosure by the Government is
38+
// subject to the restrictions as set forth in FAR 52.227 - 14 and DFAR252.227 -
39+
// 7013, et seq., or its successor. Use of the Materials by the Government
40+
// constitutes acknowledgement of AMD's proprietary rights in them.
41+
//
42+
// EXPORT RESTRICTIONS: The Materials may be subject to export restrictions as
43+
// stated in the Software License Agreement.
44+
//
45+
////////////////////////////////////////////////////////////////////////////////
46+
47+
#ifndef AMD_HSA_COMMON_H
48+
#define AMD_HSA_COMMON_H
49+
50+
#include <stddef.h>
51+
#include <stdint.h>
52+
53+
// Descriptive version of the HSA Application Binary Interface.
54+
#define AMD_HSA_ABI_VERSION "AMD GPU Architecture v0.35 (June 25, 2015)"
55+
56+
// Alignment attribute that specifies a minimum alignment (in bytes) for
57+
// variables of the specified type.
58+
#if defined(__GNUC__)
59+
# define __ALIGNED__(x) __attribute__((aligned(x)))
60+
#elif defined(_MSC_VER)
61+
# define __ALIGNED__(x) __declspec(align(x))
62+
#elif defined(RC_INVOKED)
63+
# define __ALIGNED__(x)
64+
#else
65+
# error
66+
#endif
67+
68+
// Creates enumeration entries for packed types. Enumeration entries include
69+
// bit shift amount, bit width, and bit mask.
70+
#define AMD_HSA_BITS_CREATE_ENUM_ENTRIES(name, shift, width) \
71+
name ## _SHIFT = (shift), \
72+
name ## _WIDTH = (width), \
73+
name = (((1 << (width)) - 1) << (shift)) \
74+
75+
// Gets bits for specified mask from specified src packed instance.
76+
#define AMD_HSA_BITS_GET(src, mask) \
77+
((src & mask) >> mask ## _SHIFT) \
78+
79+
// Sets val bits for specified mask in specified dst packed instance.
80+
#define AMD_HSA_BITS_SET(dst, mask, val) \
81+
dst &= (~(1 << mask ## _SHIFT) & ~mask); \
82+
dst |= (((val) << mask ## _SHIFT) & mask) \
83+
84+
#endif // AMD_HSA_COMMON_H

0 commit comments

Comments
 (0)