mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-07 13:41:24 +00:00
stream: pylint/pep8 fixes.
This commit is contained in:
parent
1562f17d8c
commit
a72ae92ece
@ -11,6 +11,7 @@
|
|||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
# pylint: disable=attribute-defined-outside-init
|
||||||
|
|
||||||
from wlauto import Workload, Parameter, Executable
|
from wlauto import Workload, Parameter, Executable
|
||||||
|
|
||||||
@ -20,20 +21,23 @@ import re
|
|||||||
stream_results_txt = 'stream_results.txt'
|
stream_results_txt = 'stream_results.txt'
|
||||||
system_array_regex = re.compile(r'^This system uses (\d)')
|
system_array_regex = re.compile(r'^This system uses (\d)')
|
||||||
|
|
||||||
regex_map = {"array_size": (re.compile(r'^Array size = (\d+)'), "elements"),
|
regex_map = {
|
||||||
|
"array_size": (re.compile(r'^Array size = (\d+)'), "elements"),
|
||||||
"total_threads_requested": (re.compile(r'^Number of Threads requested = (\d+)'), "threads"),
|
"total_threads_requested": (re.compile(r'^Number of Threads requested = (\d+)'), "threads"),
|
||||||
"total_thread_count": (re.compile(r'^Number of Threads counted = (\d+)'), "threads")
|
"total_thread_count": (re.compile(r'^Number of Threads counted = (\d+)'), "threads")
|
||||||
}
|
}
|
||||||
|
|
||||||
regex_map2 = {"memory_per_array": re.compile(r'^Memory per array = (\d*.\d*) (\w+)'),
|
regex_map2 = {
|
||||||
|
"memory_per_array": re.compile(r'^Memory per array = (\d*.\d*) (\w+)'),
|
||||||
"total_memory_required": re.compile(r'^Total memory required = (\d*.\d*) (\w+)')
|
"total_memory_required": re.compile(r'^Total memory required = (\d*.\d*) (\w+)')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Stream(Workload):
|
class Stream(Workload):
|
||||||
|
|
||||||
name = 'stream'
|
name = 'stream'
|
||||||
description = """stream is a workload that measures memory bandwidth.
|
description = """
|
||||||
|
Measures memory bandwidth.
|
||||||
|
|
||||||
The original source code be found on:
|
The original source code be found on:
|
||||||
https://www.cs.virginia.edu/stream/FTP/Code/
|
https://www.cs.virginia.edu/stream/FTP/Code/
|
||||||
@ -52,7 +56,6 @@ class Stream(Workload):
|
|||||||
Stream.stream_default = self.device.install(Stream.stream_noomp_binary)
|
Stream.stream_default = self.device.install(Stream.stream_noomp_binary)
|
||||||
Stream.stream_optional = self.device.install(Stream.stream_omp_binary)
|
Stream.stream_optional = self.device.install(Stream.stream_omp_binary)
|
||||||
|
|
||||||
|
|
||||||
def setup(self, context):
|
def setup(self, context):
|
||||||
self.results = os.path.join(self.device.working_directory, stream_results_txt)
|
self.results = os.path.join(self.device.working_directory, stream_results_txt)
|
||||||
self.timeout = 50
|
self.timeout = 50
|
||||||
@ -62,7 +65,6 @@ class Stream(Workload):
|
|||||||
else:
|
else:
|
||||||
self.command = '{} > {}'.format(self.stream_default, self.results)
|
self.command = '{} > {}'.format(self.stream_default, self.results)
|
||||||
|
|
||||||
|
|
||||||
def run(self, context):
|
def run(self, context):
|
||||||
self.output = self.device.execute(self.command, timeout=self.timeout)
|
self.output = self.device.execute(self.command, timeout=self.timeout)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user