From 7fb2dfd50b64c9b4c7fb072d002f4eec2e7a1ca0 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 16 May 2019 11:41:12 +0200 Subject: [PATCH 1/5] Make CUDA kernel latency test generic --- .../kernel_latency/kernel_latency.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py index 0ac3bd69a5..20f65652fd 100644 --- a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py +++ b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py @@ -19,13 +19,20 @@ def __init__(self, kernel_version): gpu_arch = '60' self.modules = ['craype-accel-nvidia60'] self.valid_prog_environs += ['PrgEnv-gnu'] - else: + elif self.current_system == 'kesch': self.num_gpus_per_node = 16 self.modules = ['craype-accel-nvidia35'] gpu_arch = '37' + else: + # Enable test running on an unknown system + self.valid_systems = ['*'] + self.valid_prog_environs = ['*'] + gpu_arch = None - self.build_system.cxxflags = ['-arch=compute_%s' % gpu_arch, - '-code=sm_%s' % gpu_arch, '-std=c++11'] + self.build_system.cxxflags = ['-std=c++11'] + if gpu_arch: + self.build_system.cxxflags += ['-arch=compute_%s' % gpu_arch, + '-code=sm_%s' % gpu_arch] if kernel_version == 'sync': self.build_system.cppflags = ['-D SYNCKERNEL=1'] @@ -59,6 +66,9 @@ def __init__(self, kernel_version): 'kesch:cn': { 'latency': (12.0, None, 0.10, 'us') }, + '*': { + 'latency': (0.0, None, None, 'us') + } }, 'async': { 'dom:gpu': { @@ -70,6 +80,9 @@ def __init__(self, kernel_version): 'kesch:cn': { 'latency': (5.7, None, 0.10, 'us') }, + '*': { + 'latency': (0.0, None, None, 'us') + } }, } From 3e711ad1119b345046e6b813bcfe32c34391a217 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 16 May 2019 12:01:23 +0200 Subject: [PATCH 2/5] Fix formatting --- cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py index 20f65652fd..e852eae263 100644 --- a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py +++ b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py @@ -32,7 +32,7 @@ def __init__(self, kernel_version): self.build_system.cxxflags = ['-std=c++11'] if gpu_arch: self.build_system.cxxflags += ['-arch=compute_%s' % gpu_arch, - '-code=sm_%s' % gpu_arch] + '-code=sm_%s' % gpu_arch] if kernel_version == 'sync': self.build_system.cppflags = ['-D SYNCKERNEL=1'] From 11cc0480db1687616ddcab1437de6a1c9ca7e05c Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 17 May 2019 14:19:59 +0200 Subject: [PATCH 3/5] Fine tune CUDA kernel latency check --- .../kernel_latency/kernel_latency.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py index e852eae263..2dddda29f3 100644 --- a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py +++ b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py @@ -7,29 +7,31 @@ class KernelLatencyTest(rfm.RegressionTest): def __init__(self, kernel_version): super().__init__() - self.sourcepath = 'kernel_latency.cu' - self.build_system = 'SingleSource' + # List known partitions here so as to avoid specifying them every time + # with --system self.valid_systems = ['daint:gpu', 'dom:gpu', 'kesch:cn'] - self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi'] self.num_tasks = 0 self.num_tasks_per_node = 1 - + self.sourcepath = 'kernel_latency.cu' + self.build_system = 'SingleSource' + self.build_system.cxxflags = ['-std=c++11'] if self.current_system.name in {'dom', 'daint'}: self.num_gpus_per_node = 1 gpu_arch = '60' self.modules = ['craype-accel-nvidia60'] - self.valid_prog_environs += ['PrgEnv-gnu'] + self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi', + 'PrgEnv-gnu'] elif self.current_system == 'kesch': self.num_gpus_per_node = 16 + self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi'] self.modules = ['craype-accel-nvidia35'] gpu_arch = '37' else: - # Enable test running on an unknown system + # Enable test when running on an unknown system self.valid_systems = ['*'] self.valid_prog_environs = ['*'] gpu_arch = None - self.build_system.cxxflags = ['-std=c++11'] if gpu_arch: self.build_system.cxxflags += ['-arch=compute_%s' % gpu_arch, '-code=sm_%s' % gpu_arch] From 2c8f1d53575ee9ec165351e08dfcf631cf58ab08 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 17 May 2019 17:40:43 +0200 Subject: [PATCH 4/5] Fix system check for Kesch --- cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py index 2dddda29f3..ce007948b2 100644 --- a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py +++ b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py @@ -21,7 +21,7 @@ def __init__(self, kernel_version): self.modules = ['craype-accel-nvidia60'] self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi', 'PrgEnv-gnu'] - elif self.current_system == 'kesch': + elif self.current_system.name == 'kesch': self.num_gpus_per_node = 16 self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-pgi'] self.modules = ['craype-accel-nvidia35'] From 9c2211e2d3b9c255644fe19f9c9e2837dca24eb7 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 22 May 2019 18:29:15 +0200 Subject: [PATCH 5/5] Set num_gpus_per_node for unknown systems --- cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py index ce007948b2..442cb90594 100644 --- a/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py +++ b/cscs-checks/microbenchmarks/kernel_latency/kernel_latency.py @@ -28,6 +28,7 @@ def __init__(self, kernel_version): gpu_arch = '37' else: # Enable test when running on an unknown system + self.num_gpus_per_node = 1 self.valid_systems = ['*'] self.valid_prog_environs = ['*'] gpu_arch = None