[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]
Этот коммит содержится в:
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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"
|
||||
|
||||
Ссылка в новой задаче
Block a user