[HIPIFY] Initial support of translation to ROCm

+ Option '-roc' is added to translate to ROCm instead of HIP
+ Update hipification mechanism accordingly
+ Populate all translation maps with additional field for ROCm identifiers
+ There are 4 degrees of CUDA support now: full support, only by HIP, only by ROCm, unsupported


[ROCm/hip commit: c5ed25da22]
This commit is contained in:
Evgeny Mankov
2018-12-06 21:52:54 +03:00
parent 42f97d2e46
commit 3621afd4e6
23 changed files with 3735 additions and 3705 deletions
+3 -1
View File
@@ -2,6 +2,7 @@
#include <assert.h>
#include <sstream>
#include <iomanip>
#include "ArgParse.h"
const char *counterNames[NUM_CONV_TYPES] = {
"error", // CONV_ERROR
@@ -137,7 +138,8 @@ Statistics::Statistics(const std::string& name): fileName(name) {
///////// Counter update routines //////////
void Statistics::incrementCounter(const hipCounter &counter, const std::string& name) {
if (counter.unsupported) {
if ((!TranslateToRoc && (HIP_UNSUPPORTED == (counter.supportDegree & HIP_UNSUPPORTED))) ||
(TranslateToRoc && (ROC_UNSUPPORTED == (counter.supportDegree & ROC_UNSUPPORTED)))) {
unsupported.incrementCounter(counter, name);
} else {
supported.incrementCounter(counter, name);