Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various minor improvements and compatibility enhancements #45

Merged
merged 15 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions slothy-cli
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,8 @@ def _main():
logger.debug("Parsing %s is a dictionary -- parse recursively", val)
return { parse_config_value_as(k, None) : parse_config_value_as(v, None)
for k,v in kvs }
if val.isidentifier():
logger.debug("Parsing %s as string", val)
return val
raise CmdLineException(f"Could not parse configuration value '{val}'")
logger.debug("Parsing %s as string", val)
return val

# A plain '-c' without arguments should list all available configuration options
if [] in args.config:
Expand Down
34 changes: 34 additions & 0 deletions slothy/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,18 @@ def with_llvm_mca(self):
"""
return self._with_llvm_mca_before and self._with_llvm_mca_after

@property
def llvm_mca_full(self):
"""Indicates whether all available statistics from LLVM MCA should be printed.
"""
return self._llvm_mca_full

@property
def llvm_mca_issue_width_overwrite(self):
"""Overwrite LLVM MCA's in-built issue width with the one SLOTHY uses
"""
return self._llvm_mca_issue_width_overwrite

@property
def with_llvm_mca_before(self):
"""Indicates whether LLVM MCA should be run prior to optimization
Expand Down Expand Up @@ -334,6 +346,14 @@ def compiler_binary(self):
or `with_llvm_mca_after` are set."""
return self._compiler_binary

@property
def compiler_include_paths(self):
"""Include path to add to compiler invocations

This is only relevant if `with_preprocessor` or `with_llvm_mca_before`
or `with_llvm_mca_after` are set."""
return self._compiler_include_paths

@property
def llvm_mca_binary(self):
"""The llvm-mca binary to be used for estimated performance annotations
Expand Down Expand Up @@ -1021,6 +1041,7 @@ def __init__(self, Arch, Target):
self._split_heuristic_preprocess_naive_interleaving_by_latency = False

self._compiler_binary = "gcc"
self._compiler_include_paths = None
self._llvm_mca_binary = "llvm-mca"

self.keep_tags = True
Expand All @@ -1030,6 +1051,8 @@ def __init__(self, Arch, Target):
self._do_address_fixup = True

self._with_preprocessor = False
self._llvm_mca_full = False
self._llvm_mca_issue_width_overwrite = False
self._with_llvm_mca_before = False
self._with_llvm_mca_after = False
self._max_solutions = 64
Expand All @@ -1048,6 +1071,8 @@ def __init__(self, Arch, Target):
self.late_char = 'l'
self.core_char = '*'

self.mirror_char = "~"

self.typing_hints = {}

self.solver_random_seed = 42
Expand Down Expand Up @@ -1112,6 +1137,12 @@ def max_solutions(self, val):
@with_preprocessor.setter
def with_preprocessor(self, val):
self._with_preprocessor = val
@llvm_mca_issue_width_overwrite.setter
def llvm_mca_issue_width_overwrite(self, val):
self._llvm_mca_issue_width_overwrite = val
@llvm_mca_full.setter
def llvm_mca_full(self, val):
self._llvm_mca_full = val
@with_llvm_mca.setter
def with_llvm_mca(self, val):
self._with_llvm_mca_before = val
Expand All @@ -1125,6 +1156,9 @@ def with_llvm_mca_before(self, val):
@compiler_binary.setter
def compiler_binary(self, val):
self._compiler_binary = val
@compiler_include_paths.setter
def compiler_include_paths(self, val):
self._compiler_include_paths = val
@llvm_mca_binary.setter
def llvm_mca_binary(self, val):
self._llvm_mca_binary = val
Expand Down
Loading
Loading