Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP
[ROCm/hip commit: bb2b416337]
Этот коммит содержится в:
поставляемый
+4
-4
@@ -447,13 +447,13 @@ nvcc:
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Block of string constants customizing behavior for cuda
|
||||
String nvcc_ver = 'nvcc-8.0'
|
||||
String from_image = 'nvidia/cuda:8.0-devel'
|
||||
String nvcc_ver = 'nvcc-9.0'
|
||||
String from_image = 'nvidia/cuda:9.0-devel'
|
||||
|
||||
// This unfortunately hardcodes the driver version nvidia_driver_375.74 in the volume mount. Research if a way
|
||||
// This unfortunately hardcodes the driver version nvidia_driver_384.90 in the volume mount. Research if a way
|
||||
// exists to get volume driver to customize the volume names to leave out driver version
|
||||
String inside_args = '''--device=/dev/nvidiactl --device=/dev/nvidia0 --device=/dev/nvidia-uvm --device=/dev/nvidia-uvm-tools
|
||||
--volume-driver=nvidia-docker --volume=nvidia_driver_375.74:/usr/local/nvidia:ro''';
|
||||
--volume-driver=nvidia-docker --volume=nvidia_driver_384.90:/usr/local/nvidia:ro''';
|
||||
|
||||
// Checkout source code, dependencies and version files
|
||||
String source_hip_rel = checkout_and_version( nvcc_ver )
|
||||
|
||||
@@ -29,7 +29,9 @@ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
link_directories(${LLVM_LIBRARY_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
add_llvm_executable(hipify-clang src/Cuda2Hip.cpp)
|
||||
|
||||
file(GLOB_RECURSE HIPIFY_SOURCES src/*.cpp)
|
||||
add_llvm_executable(hipify-clang ${HIPIFY_SOURCES})
|
||||
|
||||
set(CMAKE_CXX_COMPILER ${LLVM_TOOLS_BINARY_DIR}/clang++)
|
||||
set(CMAKE_C_COMPILER ${LLVM_TOOLS_BINARY_DIR}/clang)
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
// TODO: This shouldn't really be here. More restructuring needed...
|
||||
struct hipCounter {
|
||||
llvm::StringRef hipName;
|
||||
ConvTypes countType;
|
||||
ApiTypes countApiType;
|
||||
int unsupported;
|
||||
};
|
||||
|
||||
#define HIP_UNSUPPORTED -1
|
||||
|
||||
/// Macros to ignore.
|
||||
extern const std::set<llvm::StringRef> CUDA_EXCLUDES;
|
||||
|
||||
/// Maps cuda header names to hip header names.
|
||||
extern const std::map<llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP;
|
||||
|
||||
/// Maps the names of CUDA types to the corresponding hip types.
|
||||
extern const std::map<llvm::StringRef, hipCounter> CUDA_TYPE_NAME_MAP;
|
||||
|
||||
/// Map all other CUDA identifiers (function/macro names, enum values) to hip versions.
|
||||
extern const std::map<llvm::StringRef, hipCounter> CUDA_IDENTIFIER_MAP;
|
||||
|
||||
/**
|
||||
* The union of all the above maps.
|
||||
*
|
||||
* This should be used rarely, but is still needed to convert macro definitions (which can
|
||||
* contain any combination of the above things). AST walkers can usually get away with just
|
||||
* looking in the lookup table for the type of element they are processing, however, saving
|
||||
* a great deal of time.
|
||||
*/
|
||||
const std::map<llvm::StringRef, hipCounter>& CUDA_RENAMES_MAP();
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
enum ConvTypes {
|
||||
CONV_VERSION = 0,
|
||||
CONV_INIT,
|
||||
CONV_DEVICE,
|
||||
CONV_MEM,
|
||||
CONV_KERN,
|
||||
CONV_COORD_FUNC,
|
||||
CONV_MATH_FUNC,
|
||||
CONV_SPECIAL_FUNC,
|
||||
CONV_STREAM,
|
||||
CONV_EVENT,
|
||||
CONV_OCCUPANCY,
|
||||
CONV_CONTEXT,
|
||||
CONV_PEER,
|
||||
CONV_MODULE,
|
||||
CONV_CACHE,
|
||||
CONV_EXEC,
|
||||
CONV_ERROR,
|
||||
CONV_DEF,
|
||||
CONV_TEX,
|
||||
CONV_GL,
|
||||
CONV_GRAPHICS,
|
||||
CONV_SURFACE,
|
||||
CONV_JIT,
|
||||
CONV_D3D9,
|
||||
CONV_D3D10,
|
||||
CONV_D3D11,
|
||||
CONV_VDPAU,
|
||||
CONV_EGL,
|
||||
CONV_THREAD,
|
||||
CONV_OTHER,
|
||||
CONV_INCLUDE,
|
||||
CONV_INCLUDE_CUDA_MAIN_H,
|
||||
CONV_TYPE,
|
||||
CONV_LITERAL,
|
||||
CONV_NUMERIC_LITERAL,
|
||||
CONV_LAST
|
||||
};
|
||||
|
||||
enum ApiTypes {
|
||||
API_DRIVER = 0,
|
||||
API_RUNTIME,
|
||||
API_BLAS,
|
||||
API_LAST
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
|
||||
config.llvm_tools_dir = "@LLVM_TOOLS_BINARY_DIR@"
|
||||
config.obj_root = "@BINARY_DIR@"
|
||||
config.obj_root = "@CMAKE_CURRENT_BINARY_DIR@"
|
||||
config.cuda_root = "@CUDA_TOOLKIT_ROOT_DIR@"
|
||||
|
||||
# Support substitution of the tools and libs dirs with user parameters. This is
|
||||
|
||||
Ссылка в новой задаче
Block a user