Perf tests: method ::perf::TestBase::getDataPath made public static; added base CUDA detection into run.py script

This commit is contained in:
Andrey Kamaev
2011-09-08 11:01:45 +00:00
parent ccfb3e6a21
commit 6cb1036e04
4 changed files with 14 additions and 4 deletions

View File

@@ -203,6 +203,7 @@ public:
TestBase();
static void Init(int argc, const char* const argv[]);
static std::string getDataPath(const std::string& relativePath);
protected:
virtual void PerfTestBody() = 0;
@@ -214,8 +215,6 @@ protected:
void stopTimer();
bool next();
std::string getDataPath(const std::string& relativePath);
//_declareHelper declare;
enum

View File

@@ -22,6 +22,8 @@ parse_patterns = (
{'name': "is_x64", 'default': "OFF", 'pattern': re.compile("^CUDA_64_BIT_DEVICE_CODE:BOOL=(ON)$")},#ugly(
{'name': "cmake_generator", 'default': None, 'pattern': re.compile("^CMAKE_GENERATOR:INTERNAL=(.+)$")},
{'name': "cxx_compiler", 'default': None, 'pattern': re.compile("^CMAKE_CXX_COMPILER:FILEPATH=(.+)$")},
{'name': "with_cuda", 'default': "OFF", 'pattern': re.compile("^WITH_CUDA:BOOL=(ON)$")},
{'name': "cuda_library", 'default': None, 'pattern': re.compile("^CUDA_CUDA_LIBRARY:FILEPATH=(.+)$")},
)
def query_yes_no(stdout, question, default="yes"):
@@ -67,6 +69,7 @@ class RunInfo(object):
except:
pass
cachefile.close()
# fix empty tests dir
if not self.tests_dir:
self.tests_dir = self.path
@@ -120,6 +123,12 @@ class RunInfo(object):
else:
self.targetarch = "unknown"
# fix CUDA attributes
self.with_cuda = self.with_cuda == "ON"
if self.cuda_library and self.cuda_library.endswith("-NOTFOUND"):
self.cuda_library = None
self.has_cuda = self.with_cuda and self.cuda_library and self.targetarch in ["x86", "x64"]
self.hardware = None
self.getSvnVersion(self.cmake_home, "cmake_home_svn")
@@ -210,6 +219,8 @@ class RunInfo(object):
rev = ""
if self.hardware:
hw = str(self.hardware).replace(" ", "_") + "_"
elif self.has_cuda:
hw = "CUDA_"
else:
hw = ""
#stamp = timestamp.strftime("%Y%m%dT%H%M%S")