gpu-compute,tests: Move GPU tests to testlib (#1270)

A new host tag `gcn_gpu` has been added. This allows for selection of
those GPU tests which depend upon the gcn-gpu docker image to run.

In addition to this, the square GPU tests has been moved to the CI
tests. This ensures some GPU code is compiled and run on every PR.
This commit is contained in:
Bobby R. Bruce
2024-08-19 10:58:06 -07:00
committed by GitHub
parent b0d81ec8a2
commit f600db4a98
8 changed files with 255 additions and 97 deletions

View File

@@ -40,6 +40,7 @@ from m5.objects import *
from m5.util import addToPath
from gem5.isas import ISA
from gem5.resources.resource import obtain_resource
from gem5.runtime import get_supported_isas
addToPath("../")
@@ -402,6 +403,22 @@ parser.add_argument(
help="cache replacement policy" "policy for sqc",
)
parser.add_argument(
"--download-resource",
type=str,
default=None,
required=False,
help="Download this resources prior to simulation",
)
parser.add_argument(
"--download-dir",
type=str,
default=None,
required=False,
help="Download resources to this directory",
)
Ruby.define_options(parser)
# add TLB options to the parser
@@ -409,6 +426,17 @@ GPUTLBOptions.tlb_options(parser)
args = parser.parse_args()
# Get the resource if specified.
if args.download_resource:
resources = obtain_resource(
resource_id=args.download_resource,
resource_directory=args.download_dir,
)
# This line seems pointless but is actually what triggers the download.
resources.get_local_path()
# The GPU cache coherence protocols only work with the backing store
args.access_backing_store = True