Merge pull request #856 from emankov/master
[HIPIFY] Introduce CUDA installation path option '--cuda-path'
이 커밋은 다음에 포함됨:
+2
-2
@@ -320,9 +320,9 @@ For example:
|
|||||||
```shell
|
```shell
|
||||||
./hipify-clang \
|
./hipify-clang \
|
||||||
square.cu \
|
square.cu \
|
||||||
-- \
|
|
||||||
--cuda-path=/usr/local/cuda-8.0 \
|
--cuda-path=/usr/local/cuda-8.0 \
|
||||||
-isystem /usr/local/cuda-8.0/samples/common/inc
|
-- \
|
||||||
|
-I /usr/local/cuda-8.0/samples/common/inc
|
||||||
```
|
```
|
||||||
|
|
||||||
`hipify-clang` arguments are given first, followed by a separator, and then the arguments you'd pass to `clang` if you
|
`hipify-clang` arguments are given first, followed by a separator, and then the arguments you'd pass to `clang` if you
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ cl::opt<std::string> TemporaryDir("temp-dir",
|
|||||||
cl::value_desc("directory"),
|
cl::value_desc("directory"),
|
||||||
cl::cat(ToolTemplateCategory));
|
cl::cat(ToolTemplateCategory));
|
||||||
|
|
||||||
|
cl::opt<std::string> CudaPath("cuda-path",
|
||||||
|
cl::desc("CUDA installation path"),
|
||||||
|
cl::value_desc("directory"),
|
||||||
|
cl::cat(ToolTemplateCategory));
|
||||||
|
|
||||||
cl::opt <bool> SaveTemps("save-temps",
|
cl::opt <bool> SaveTemps("save-temps",
|
||||||
cl::desc("Save temporary files"),
|
cl::desc("Save temporary files"),
|
||||||
cl::value_desc("save-temps"),
|
cl::value_desc("save-temps"),
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ extern cl::OptionCategory ToolTemplateCategory;
|
|||||||
extern cl::opt<std::string> OutputFilename;
|
extern cl::opt<std::string> OutputFilename;
|
||||||
extern cl::opt<std::string> OutputDir;
|
extern cl::opt<std::string> OutputDir;
|
||||||
extern cl::opt<std::string> TemporaryDir;
|
extern cl::opt<std::string> TemporaryDir;
|
||||||
|
extern cl::opt<std::string> CudaPath;
|
||||||
extern cl::opt<bool> Inplace;
|
extern cl::opt<bool> Inplace;
|
||||||
extern cl::opt<bool> SaveTemps;
|
extern cl::opt<bool> SaveTemps;
|
||||||
extern cl::opt<bool> NoBackup;
|
extern cl::opt<bool> NoBackup;
|
||||||
|
|||||||
@@ -174,6 +174,10 @@ int main(int argc, const char **argv) {
|
|||||||
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("cuda", ct::ArgumentInsertPosition::BEGIN));
|
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("cuda", ct::ArgumentInsertPosition::BEGIN));
|
||||||
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-x", ct::ArgumentInsertPosition::BEGIN));
|
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-x", ct::ArgumentInsertPosition::BEGIN));
|
||||||
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("--cuda-host-only", ct::ArgumentInsertPosition::BEGIN));
|
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("--cuda-host-only", ct::ArgumentInsertPosition::BEGIN));
|
||||||
|
if (!CudaPath.empty()) {
|
||||||
|
std::string sCudaPath = "--cuda-path=" + CudaPath;
|
||||||
|
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(sCudaPath.c_str(), ct::ArgumentInsertPosition::BEGIN));
|
||||||
|
}
|
||||||
// Includes for clang's CUDA wrappers for using by packaged hipify-clang
|
// Includes for clang's CUDA wrappers for using by packaged hipify-clang
|
||||||
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("./include", ct::ArgumentInsertPosition::BEGIN));
|
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("./include", ct::ArgumentInsertPosition::BEGIN));
|
||||||
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-isystem", ct::ArgumentInsertPosition::BEGIN));
|
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-isystem", ct::ArgumentInsertPosition::BEGIN));
|
||||||
|
|||||||
@@ -64,18 +64,20 @@ if obj_root is not None:
|
|||||||
config.environment['PATH'] = path
|
config.environment['PATH'] = path
|
||||||
|
|
||||||
hipify_path = obj_root
|
hipify_path = obj_root
|
||||||
clang_args = "-v --cuda-path='%s'"
|
|
||||||
|
|
||||||
|
clang_arguments = "-v"
|
||||||
if sys.platform in ['win32']:
|
if sys.platform in ['win32']:
|
||||||
run_test_ext = ".bat"
|
run_test_ext = ".bat"
|
||||||
hipify_path += "/" + config.build_type
|
hipify_path += "/" + config.build_type
|
||||||
clang_args += " -isystem'%s'/common/inc"
|
clang_arguments += " -isystem'%s'/common/inc"
|
||||||
else:
|
else:
|
||||||
run_test_ext = ".sh"
|
run_test_ext = ".sh"
|
||||||
clang_args += " -isystem'%s'/samples/common/inc"
|
clang_arguments += " -isystem'%s'/samples/common/inc"
|
||||||
|
clang_arguments += " -I'%s'/include"
|
||||||
|
|
||||||
clang_args += " -I'%s'/include"
|
hipify_arguments = "--cuda-path='%s'"
|
||||||
|
|
||||||
config.substitutions.append(("%cuda_args", clang_args % (config.cuda_root, config.cuda_sdk_root, config.cuda_dnn_root)))
|
config.substitutions.append(("%clang_args", clang_arguments % (config.cuda_sdk_root, config.cuda_dnn_root)))
|
||||||
|
config.substitutions.append(("%hipify_args", hipify_arguments % (config.cuda_root)))
|
||||||
config.substitutions.append(("hipify", '"' + hipify_path + "/hipify-clang" + '"'))
|
config.substitutions.append(("hipify", '"' + hipify_path + "/hipify-clang" + '"'))
|
||||||
config.substitutions.append(("%run_test", '"' + config.test_source_root + "/run_test" + run_test_ext + '"'))
|
config.substitutions.append(("%run_test", '"' + config.test_source_root + "/run_test" + run_test_ext + '"'))
|
||||||
|
|||||||
@@ -2,17 +2,18 @@
|
|||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
for %%i in (FileCheck.exe) do set FILE_CHECK=%%~$PATH:i
|
for %%i in (FileCheck.exe) do set FILE_CHECK=%%~$PATH:i
|
||||||
if not defined FILE_CHECK (echo Error: FileCheck.exe not found in PATH. && exit /b 1)
|
if not defined FILE_CHECK (echo Error: FileCheck.exe not found in PATH. && exit /b 1)
|
||||||
|
|
||||||
set HIPIFY=%1
|
set HIPIFY=%1
|
||||||
set IN_FILE=%2
|
set IN_FILE=%2
|
||||||
set TMP_FILE=%3
|
set TMP_FILE=%3
|
||||||
|
set CUDA_ROOT=%4
|
||||||
|
|
||||||
set all_args=%*
|
set all_args=%*
|
||||||
call set clang_args=%%all_args:*%4=%%
|
call set clang_args=%%all_args:*%5=%%
|
||||||
set clang_args=%4%clang_args%
|
set clang_args=%5%clang_args%
|
||||||
|
|
||||||
%HIPIFY% -o=%TMP_FILE% %IN_FILE% -- %clang_args%
|
%HIPIFY% -o=%TMP_FILE% %IN_FILE% %CUDA_ROOT% -- %clang_args%
|
||||||
if errorlevel 1 (echo Error: hipify-clang.exe failed with exit code: %errorlevel% && exit /b %errorlevel%)
|
if errorlevel 1 (echo Error: hipify-clang.exe failed with exit code: %errorlevel% && exit /b %errorlevel%)
|
||||||
|
|
||||||
findstr /v /r /c:"[ ]*//[ ]*[CHECK*|RUN]" %TMP_FILE% | %FILE_CHECK% %IN_FILE%
|
findstr /v /r /c:"[ ]*//[ ]*[CHECK*|RUN]" %TMP_FILE% | %FILE_CHECK% %IN_FILE%
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ set -o errexit
|
|||||||
HIPIFY=$1
|
HIPIFY=$1
|
||||||
IN_FILE=$2
|
IN_FILE=$2
|
||||||
TMP_FILE=$3
|
TMP_FILE=$3
|
||||||
shift 3
|
CUDA_ROOT=$4
|
||||||
|
shift 4
|
||||||
|
|
||||||
# Remaining args are the ones to forward to clang proper.
|
# Remaining args are the ones to forward to clang proper.
|
||||||
|
|
||||||
$HIPIFY -o=$TMP_FILE $IN_FILE -- $@ && cat $TMP_FILE | sed -Ee 's|//.+|// |g' | FileCheck $IN_FILE
|
$HIPIFY -o=$TMP_FILE $IN_FILE $CUDA_ROOT -- $@ && cat $TMP_FILE | sed -Ee 's|//.+|// |g' | FileCheck $IN_FILE
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include <hip/hip_runtime.h>
|
// CHECK: #include <hip/hip_runtime.h>
|
||||||
// CHECK-NOT: #include <cuda_runtime.h>
|
// CHECK-NOT: #include <cuda_runtime.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include "hip/hip_runtime.h"
|
// CHECK: #include "hip/hip_runtime.h"
|
||||||
// CHECK-NOT: #include "cuda_runtime.h"
|
// CHECK-NOT: #include "cuda_runtime.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #pragma once
|
// CHECK: #pragma once
|
||||||
// CHECK-NEXT: #include <hip/hip_runtime.h>
|
// CHECK-NEXT: #include <hip/hip_runtime.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include <hip/hip_runtime.h>
|
// CHECK: #include <hip/hip_runtime.h>
|
||||||
// CHECK-NEXT: #include <stdio.h>
|
// CHECK-NEXT: #include <stdio.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #pragma once
|
// CHECK: #pragma once
|
||||||
// CHECK-NEXT: #include <hip/hip_runtime.h>
|
// CHECK-NEXT: #include <hip/hip_runtime.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include <hipblas.h>
|
// CHECK: #include <hipblas.h>
|
||||||
// CHECK-NOT: #include <cublas_v2.h>
|
// CHECK-NOT: #include <cublas_v2.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include "hipblas.h"
|
// CHECK: #include "hipblas.h"
|
||||||
// CHECK-NOT: #include "cublas.h"
|
// CHECK-NOT: #include "cublas.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include <hip/hip_runtime.h>
|
// CHECK: #include <hip/hip_runtime.h>
|
||||||
// CHECK-NOT: #include <cuda_runtime.h>
|
// CHECK-NOT: #include <cuda_runtime.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include <hip/hip_runtime.h>
|
// CHECK: #include <hip/hip_runtime.h>
|
||||||
// CHECK: #include <memory>
|
// CHECK: #include <memory>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include <hip/hip_runtime.h>
|
// CHECK: #include <hip/hip_runtime.h>
|
||||||
// CHECK: #include "hip/hip_complex.h"
|
// CHECK: #include "hip/hip_complex.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include <hip/hip_runtime.h>
|
// CHECK: #include <hip/hip_runtime.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// CHECK: #include <hip/hip_runtime.h>
|
// CHECK: #include <hip/hip_runtime.h>
|
||||||
#include <cuda.h>
|
#include <cuda.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
|
// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
|
// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// Taken from: http://docs.nvidia.com/cuda/curand/device-api-overview.html#poisson-api-example
|
// Taken from: http://docs.nvidia.com/cuda/curand/device-api-overview.html#poisson-api-example
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
// CHECK: #include <hip/hip_runtime.h>
|
// CHECK: #include <hip/hip_runtime.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// To measure effects of memory coalescing. Coalescing.cu
|
// To measure effects of memory coalescing. Coalescing.cu
|
||||||
// B. Wilkinson Jan 30, 2011
|
// B. Wilkinson Jan 30, 2011
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
|
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// Taken from Jonathan Hui blog https://jhui.github.io/2017/03/06/CUDA
|
// Taken from Jonathan Hui blog https://jhui.github.io/2017/03/06/CUDA
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
|
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// Taken from Jonathan Hui blog https://jhui.github.io/2017/03/06/CUDA
|
// Taken from Jonathan Hui blog https://jhui.github.io/2017/03/06/CUDA
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %run_test hipify "%s" "%t" %cuda_args
|
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
||||||
|
|
||||||
// Kernel definition
|
// Kernel definition
|
||||||
__global__ void vecAdd(float* A, float* B, float* C)
|
__global__ void vecAdd(float* A, float* B, float* C)
|
||||||
|
|||||||
새 이슈에서 참조
사용자 차단