tests: add top-level Makefile and run.sh
Change-Id: Ieaef51422c11ec27d56ff19953f9a5dd1f563353
[ROCm/rocprofiler commit: a5a56425bb]
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
# benchmarks dir
|
||||||
|
BENCH_DIR = benches
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
|
build:
|
||||||
|
$(MAKE) -C $(BENCH_DIR)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) -C $(BENCH_DIR) clean
|
||||||
@@ -14,6 +14,8 @@ against expected values (self-checking);
|
|||||||
fail.
|
fail.
|
||||||
|
|
||||||
#### Source tree ####
|
#### Source tree ####
|
||||||
|
- run.sh top-level script to start all tests
|
||||||
|
- Makefile top-level makefile
|
||||||
- run_scripts/
|
- run_scripts/
|
||||||
- global.cfg: settings and global codes used by .sh files
|
- global.cfg: settings and global codes used by .sh files
|
||||||
- test_cache_miss.sh: test TCP/TCC miss rates
|
- test_cache_miss.sh: test TCP/TCC miss rates
|
||||||
@@ -22,6 +24,7 @@ fail.
|
|||||||
- cache_pmc.txt: counters used for cache tests
|
- cache_pmc.txt: counters used for cache tests
|
||||||
- benches/
|
- benches/
|
||||||
- test_cache/: benchmark used for cached-related tests
|
- test_cache/: benchmark used for cached-related tests
|
||||||
|
- Makefile: makefile to compile benchmarks
|
||||||
|
|
||||||
|
|
||||||
#### How to run ####
|
#### How to run ####
|
||||||
@@ -29,6 +32,9 @@ fail.
|
|||||||
$cd test/memory_validation/
|
$cd test/memory_validation/
|
||||||
|
|
||||||
2) run tests
|
2) run tests
|
||||||
|
to start all tests
|
||||||
|
$run.sh
|
||||||
|
or, to separtely run each
|
||||||
$run_scripts/test_cache_miss.sh [TCP/TCC/TCP TCC]
|
$run_scripts/test_cache_miss.sh [TCP/TCC/TCP TCC]
|
||||||
$run_scripts/test_fetchwrite_size.sh
|
$run_scripts/test_fetchwrite_size.sh
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# specify each subdir here
|
||||||
|
SUBDIRS = test_cache
|
||||||
|
|
||||||
|
TARGETS = all clean
|
||||||
|
|
||||||
|
.PHONY: $(TARGETS) default
|
||||||
|
|
||||||
|
# change this line to change the default action
|
||||||
|
# (using one of the targets above)
|
||||||
|
default: all
|
||||||
|
|
||||||
|
define do-target
|
||||||
|
$(1): $$(foreach subdir, $$(SUBDIRS), $(1)-$$(subdir))
|
||||||
|
|
||||||
|
$(1)-%:
|
||||||
|
$$(MAKE) -C $$* $(1)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach tgt, $(TARGETS), $(eval $(call do-target,$(tgt))))
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
# THE SOFTWARE.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# test TCP/TCC miss
|
||||||
|
# to test separately, append TCP or TCC as argument
|
||||||
|
run_scripts/test_cache_miss.sh
|
||||||
|
|
||||||
|
# test data fetch/write size to memory
|
||||||
|
run_scripts/test_fetchwrite_size.sh
|
||||||
Verwijs in nieuw issue
Block a user