Merge branch 'amd-develop' into amd-master

Change-Id: I2b1748589c12c9f2c3433f18a3e7f3755b949bfc


[ROCm/hip commit: 364a114b67]
This commit is contained in:
Maneesh Gupta
2016-07-15 10:49:14 +05:30
melakukan fdbf9adfd5
7 mengubah file dengan 106 tambahan dan 29 penghapusan
+10 -11
Melihat File
@@ -9,16 +9,18 @@ Stay tuned - the work for many of these features is already in-flight.
===================================================================================================
Release:0.90.00
Date: 2016.06.xx
-Support dynamic shared memory allocations
-Min HCC compiler version is > 16186.
-Expanded math functions (device and host). Document unsupported functions.
-Initial support for hipBlas headers.
-hipFree with null pointer initializes runtime and returns success.
-Improve error code reporting on nvcc.
-add hipPeekAtError for nvcc..
Date: 2016.06.29
- Support dynamic shared memory allocations
- Min HCC compiler version is > 16186.
- Expanded math functions (device and host). Document unsupported functions.
- hipFree with null pointer initializes runtime and returns success.
- Improve error code reporting on nvcc.
- Add hipPeekAtError for nvcc.
===================================================================================================
## Revision History:
===================================================================================================
Release:0.86.00
Date: 2016.06.06
@@ -30,9 +32,6 @@ Date: 2016.06.06
compilation path.
- More samples including gpu-burn, SHOC, nbody, rtm. See [HIP-Examples](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP-Examples)
===================================================================================================
## Revision History:
===================================================================================================
Release:0.84.01
+18 -1
Melihat File
@@ -60,6 +60,9 @@ if ($HIP_PLATFORM eq "hcc") {
$ROCM_PATH=$ENV{'ROCM_PATH'};
$ROCM_PATH="/opt/rocm" unless defined $ROCM_PATH;
$ROCM_TARGET=$ENV{'ROCM_TARGET'};
$ROCM_TARGET="fiji" unless defined $ROCM_TARGET;
# HCC* may be used to compile src/hip_hcc.o (and also feed the HIPCXXFLAGS below)
$HCC = "$HCC_HOME/bin/hcc";
$HCCFLAGS = "-hc -I$HCC_HOME/include ";
@@ -72,12 +75,26 @@ if ($HIP_PLATFORM eq "hcc") {
$HIPLDFLAGS = "-hc -L$HCC_HOME/lib -Wl,--rpath=$HCC_HOME/lib -lc++ -ldl -lpthread -Wl,--whole-archive -lmcwamp -Wl,--no-whole-archive";
# Suppress linker warnings in case HCC distribution contains OpenCL/SPIR symbols
#$HIPLDFLAGS .= " -Wl,--defsym=_binary_kernel_spir_end=0 -Wl,--defsym=_binary_kernel_spir_start=0 -Wl,--defsym=_binary_kernel_cl_start=0 -Wl,--defsym=_binary_kernel_cl_end=0";
$HOST_OSNAME= `cat /etc/os-release | grep "^ID\=" | cut -d= -f2 | tr -d '\n'`;
$HOST_OSVER= `cat /etc/os-release | grep "^VERSION_ID\=" | cut -d= -f2 | tr -d '\n'`;
if ($HOST_OSNAME eq "ubuntu" and $HOST_OSVER eq "\"16.04\"") {
# No additional flags required
} else {
$HIPLDFLAGS .= " -Wl,--defsym=_binary_kernel_spir_end=0 -Wl,--defsym=_binary_kernel_spir_start=0 -Wl,--defsym=_binary_kernel_cl_start=0 -Wl,--defsym=_binary_kernel_cl_end=0";
}
# Satisfy HCC dependencies
$HIPLDFLAGS .= " -lc++abi";
$HIPLDFLAGS .= " -L$HSA_PATH/lib -L$ROCM_PATH/lib -lhsa-runtime64 -lhc_am -lhsakmt";
# Handle ROCm target platform
if ($ROCM_TARGET eq "fiji") {
$HIPLDFLAGS .= " -amdgpu-target=AMD:AMDGPU:8:0:3";
}
if ($ROCM_TARGET eq "hawaii") {
$HIPLDFLAGS .= " -amdgpu-target=AMD:AMDGPU:7:0:1";
}
# Add trace marker library:
# TODO - once we cleanly separate the HIP API headers from HIP library headers this logic should move to CMakebuild option - apps do not need to see the marker library.
$marker_inc_path = "$marker_path/include";
+15 -17
Melihat File
@@ -4,23 +4,21 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [FAQ](#faq)
- [Table of Contents](#table-of-contents)
- [What APIs does HIP support?](#what-apis-does-hip-support)
- [What is not supported?](#what-is-not-supported)
- [Run-time features:](#run-time-features)
- [How does HIP compare with OpenCL?](#how-does-hip-compare-with-opencl)
- [What hardware does HIP support?](#what-hardware-does-hip-support)
- [Does Hipify automatically convert all source code?](#does-hipify-automatically-convert-all-source-code)
- [What is NVCC?](#what-is-nvcc)
- [What is HCC?](#what-is-hcc)
- [Why use HIP rather than supporting CUDA directly?](#why-use-hip-rather-than-supporting-cuda-directly)
- [Can I develop HIP code on an Nvidia CUDA platform?](#can-i-develop-hip-code-on-an-nvidia-cuda-platform)
- [Can I develop HIP code on an AMD HCC platform?](#can-i-develop-hip-code-on-an-amd-hcc-platform)
- [Can a HIP binary run on both AMD and Nvidia platforms?](#can-a-hip-binary-run-on-both-amd-and-nvidia-platforms)
- [Hmmm](#hmmm)
- [Link2 Is it ready?](#link2-is-it-ready)
- [What's the difference between HIP and hc?](#whats-the-difference-between-hip-and-hc)
- [What APIs does HIP support ?](#what-apis-does-hip-support-)
- [What is not supported?](#what-is-not-supported)
- [Run-time features](#run-time-features)
- [Kernel language features](#kernel-language-features)
- [How does HIP compare with OpenCL?](#how-does-hip-compare-with-opencl)
- [What hardware does HIP support?](#what-hardware-does-hip-support)
- [Does Hipify automatically convert all source code?](#does-hipify-automatically-convert-all-source-code)
- [What is NVCC?](#what-is-nvcc)
- [What is HCC?](#what-is-hcc)
- [Why use HIP rather than supporting CUDA directly?](#why-use-hip-rather-than-supporting-cuda-directly)
- [Can I develop HIP code on an Nvidia CUDA platform?](#can-i-develop-hip-code-on-an-nvidia-cuda-platform)
- [Can I develop HIP code on an AMD HCC platform?](#can-i-develop-hip-code-on-an-amd-hcc-platform)
- [Can a HIP binary run on both AMD and Nvidia platforms?](#can-a-hip-binary-run-on-both-amd-and-nvidia-platforms)
- [What's the difference between HIP and hc?](#whats-the-difference-between-hip-and-hc)
- [HIP detected my platform (hcc vs nvcc) incorrectly - what should I do?](#hip-detected-my-platform-hcc-vs-nvcc-incorrectly---what-should-i-do)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
=================
@@ -26,6 +26,7 @@
- [Single Precision Mathematical Functions](#single-precision-mathematical-functions)
- [Double Precision Mathematical Functions](#double-precision-mathematical-functions)
- [Integer Intrinsics](#integer-intrinsics)
- [Floating-point Intrinsics](#floating-point-intrinsics)
- [Texture Functions](#texture-functions)
- [Surface Functions](#surface-functions)
- [Timer Functions](#timer-functions)
@@ -1,3 +1,49 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [HIP Porting Guide](#hip-porting-guide)
- [###Table of Contents](#table-of-contents)
- [Porting a New Cuda Project](#porting-a-new-cuda-project)
- [General Tips](#general-tips)
- [Scanning existing CUDA code to scope the porting effort](#scanning-existing-cuda-code-to-scope-the-porting-effort)
- [Converting a project "in-place"](#converting-a-project-in-place)
- [Distinguishing Compiler Modes](#distinguishing-compiler-modes)
- [Identifying HIP Target Platform](#identifying-hip-target-platform)
- [Identifying the Compiler: hcc or nvcc](#identifying-the-compiler-hcc-or-nvcc)
- [Identifying Current Compilation Pass: Host or Device](#identifying-current-compilation-pass-host-or-device)
- [Compiler Defines: Summary](#compiler-defines-summary)
- [Identifying Architecture Features](#identifying-architecture-features)
- [HIP_ARCH Defines](#hip_arch-defines)
- [Device-Architecture Properties](#device-architecture-properties)
- [Table of Architecture Properties](#table-of-architecture-properties)
- [Finding HIP](#finding-hip)
- [Compiler Options](#compiler-options)
- [Linking Issues](#linking-issues)
- [Linking With hipcc](#linking-with-hipcc)
- [-lm Option](#-lm-option)
- [Linking Code With Other Compilers](#linking-code-with-other-compilers)
- [libc++ and libstdc++](#libc-and-libstdc)
- [HIP Headers (hip_runtime.h, hip_runtime_api.h)](#hip-headers-hip_runtimeh-hip_runtime_apih)
- [Using a Standard C++ Compiler](#using-a-standard-c-compiler)
- [cuda.h](#cudah)
- [Choosing HIP File Extensions](#choosing-hip-file-extensions)
- [Workarounds](#workarounds)
- [warpSize](#warpsize)
- [Textures and Cache Control](#textures-and-cache-control)
- [More Tips](#more-tips)
- [hcc CPU Mode](#hcc-cpu-mode)
- [HIPTRACE Mode](#hiptrace-mode)
- [Environment Variables](#environment-variables)
- [Debugging hipcc](#debugging-hipcc)
- [What Does This Error Mean?](#what-does-this-error-mean)
- [/usr/include/c++/v1/memory:5172:15: error: call to implicitly deleted default constructor of 'std::__1::bad_weak_ptr' throw bad_weak_ptr();](#usrincludecv1memory517215-error-call-to-implicitly-deleted-default-constructor-of-std__1bad_weak_ptr-throw-bad_weak_ptr)
- [grid_launch kernel dispatch - fallback](#grid_launch-kernel-dispatch---fallback)
- [HIP Environment Variables](#hip-environment-variables)
- [Editor Highlighting](#editor-highlighting)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# HIP Porting Guide
In addition to providing a portable C++ programmming environement for GPUs, HIP is designed to ease
the porting of existing CUDA code into the HIP environment. This section describes the available tools
@@ -1,3 +1,11 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Table Comparing Syntax for Different Compute APIs](#table-comparing-syntax-for-different-compute-apis)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Table Comparing Syntax for Different Compute APIs
|Term|CUDA|HIP|HC|C++AMP|OpenCL|
@@ -1,3 +1,11 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Terms used in HIP Documentation](#terms-used-in-hip-documentation)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Terms used in HIP Documentation