[HIPIFY] Starts implicitly setting '-x cuda' by hipify-clang itself

+ No need in setting '-x cuda' for the user anymore;
+ Testing and Readme updated accordingly.


[ROCm/hip commit: 7ea586c323]
Этот коммит содержится в:
emankov
2018-12-29 17:04:59 +03:00
родитель 35010fa4a0
Коммит 4e50eba101
3 изменённых файлов: 3 добавлений и 2 удалений
-1
Просмотреть файл
@@ -321,7 +321,6 @@ For example:
./hipify-clang \
square.cu \
-- \
-x cuda \
--cuda-path=/usr/local/cuda-8.0 \
--cuda-gpu-arch=sm_50 \
-isystem /usr/local/cuda-8.0/samples/common/inc
+2
Просмотреть файл
@@ -171,6 +171,8 @@ int main(int argc, const char **argv) {
ReplacementsFrontendActionFactory<HipifyAction> actionFactory(&replacementsToUse);
std::string sInclude = "-I" + sys::path::parent_path(sourceAbsPath).str();
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(sInclude.c_str(), ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("cuda", ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-x", ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("--cuda-host-only", ct::ArgumentInsertPosition::BEGIN));
// Ensure at least c++11 is used.
std::string stdCpp = "-std=c++11";
+1 -1
Просмотреть файл
@@ -60,7 +60,7 @@ if obj_root is not None:
config.environment['PATH'] = path
hipify_path = obj_root
clang_args = "-x cuda -v --cuda-gpu-arch=sm_30 --cuda-path='%s'"
clang_args = "-v --cuda-gpu-arch=sm_30 --cuda-path='%s'"
if sys.platform in ['win32']:
run_test_ext = ".bat"