Update archspec to HEAD of develop (#36657)
This commit is contained in:
parent
f28219cdda
commit
3e1c6b27a4
3 changed files with 62 additions and 12 deletions
2
lib/spack/external/__init__.py
vendored
2
lib/spack/external/__init__.py
vendored
|
@ -18,7 +18,7 @@
|
|||
|
||||
* Homepage: https://pypi.python.org/pypi/archspec
|
||||
* Usage: Labeling, comparison and detection of microarchitectures
|
||||
* Version: 0.2.0 (commit e44bad9c7b6defac73696f64078b2fe634719b62)
|
||||
* Version: 0.2.0-dev (commit f3667f95030c6573842fb5f6df0d647285597509)
|
||||
|
||||
astunparse
|
||||
----------------
|
||||
|
|
60
lib/spack/external/archspec/cli.py
vendored
60
lib/spack/external/archspec/cli.py
vendored
|
@ -6,19 +6,61 @@
|
|||
archspec command line interface
|
||||
"""
|
||||
|
||||
import click
|
||||
import argparse
|
||||
import typing
|
||||
|
||||
import archspec
|
||||
import archspec.cpu
|
||||
|
||||
|
||||
@click.group(name="archspec")
|
||||
@click.version_option(version=archspec.__version__)
|
||||
def main():
|
||||
"""archspec command line interface"""
|
||||
def _make_parser() -> argparse.ArgumentParser:
|
||||
parser = argparse.ArgumentParser(
|
||||
"archspec",
|
||||
description="archspec command line interface",
|
||||
add_help=False,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--version",
|
||||
"-V",
|
||||
help="Show the version and exit.",
|
||||
action="version",
|
||||
version=f"archspec, version {archspec.__version__}",
|
||||
)
|
||||
parser.add_argument("--help", "-h", help="Show the help and exit.", action="help")
|
||||
|
||||
subcommands = parser.add_subparsers(
|
||||
title="command",
|
||||
metavar="COMMAND",
|
||||
dest="command",
|
||||
)
|
||||
|
||||
cpu_command = subcommands.add_parser(
|
||||
"cpu",
|
||||
help="archspec command line interface for CPU",
|
||||
description="archspec command line interface for CPU",
|
||||
)
|
||||
cpu_command.set_defaults(run=cpu)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
@main.command()
|
||||
def cpu():
|
||||
"""archspec command line interface for CPU"""
|
||||
click.echo(archspec.cpu.host())
|
||||
def cpu() -> int:
|
||||
"""Run the `archspec cpu` subcommand."""
|
||||
print(archspec.cpu.host())
|
||||
return 0
|
||||
|
||||
|
||||
def main(argv: typing.Optional[typing.List[str]] = None) -> int:
|
||||
"""Run the `archspec` command line interface."""
|
||||
parser = _make_parser()
|
||||
|
||||
try:
|
||||
args = parser.parse_args(argv)
|
||||
except SystemExit as err:
|
||||
return err.code
|
||||
|
||||
if args.command is None:
|
||||
parser.print_help()
|
||||
return 0
|
||||
|
||||
return args.run()
|
||||
|
|
|
@ -2782,6 +2782,10 @@
|
|||
{
|
||||
"versions": "13.0:",
|
||||
"flags" : "-mcpu=apple-m1"
|
||||
},
|
||||
{
|
||||
"versions": "16.0:",
|
||||
"flags" : "-mcpu=apple-m2"
|
||||
}
|
||||
],
|
||||
"apple-clang": [
|
||||
|
@ -2790,8 +2794,12 @@
|
|||
"flags" : "-march=armv8.5-a"
|
||||
},
|
||||
{
|
||||
"versions": "13.0:",
|
||||
"flags" : "-mcpu=vortex"
|
||||
"versions": "13.0:14.0.2",
|
||||
"flags" : "-mcpu=apple-m1"
|
||||
},
|
||||
{
|
||||
"versions": "14.0.2:",
|
||||
"flags" : "-mcpu=apple-m2"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue