Skip to content

Commit

Permalink
arch: max apple mcpu
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Jan 16, 2024
1 parent 553f3ef commit d70bda2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion devito/arch/archinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,9 @@ class AppleArm(Arm):
def march(self):
sysinfo = run(["sysctl", "-n", "machdep.cpu.brand_string"],
stdout=PIPE, stderr=DEVNULL).stdout.decode("utf-8")
return sysinfo.split(' ')[1].lower()
mx = sysinfo.split(' ')[1].lower()
# Currently clang only supports up to m2
return min(mx, 'm2')


class Amd(Cpu64):
Expand Down
8 changes: 3 additions & 5 deletions devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,9 @@ def version(self):
except (TypeError, ValueError):
version = Version(self.suffix)
else:
try:
# Knowing the version may still be useful to pick supported flags
version = sniff_compiler_version(self.CC)
except (FileNotFoundError, OSError):
version = Version("0")
# Knowing the version may still be useful to pick supported flags
version = sniff_compiler_version(self.CC)

return version

def get_version(self):
Expand Down

0 comments on commit d70bda2

Please sign in to comment.