-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplify micro arch selection; set default micro arch to x86-64-v2
- Loading branch information
Showing
20 changed files
with
136 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
%ifarch x86_64 | ||
%define vectorized_packages zlib fastjet tensorflow-sources tensorflow OpenBLAS rivet gbl lwtnn opencv pytorch | ||
%{expand:%(for t in %{vectorized_packages} ; do echo Requires: $t; for v in %{package_vectorization}; do echo Requires: ${t}_${v}; done; done)} | ||
%endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
%ifarch x86_64 | ||
%define default_microarch -mx86-64-v2 | ||
%if "%{?override_microarch:set}" == "set" | ||
%define selected_microarch %{override_microarch} | ||
%else | ||
%define selected_microarch %{default_microarch} | ||
%endif | ||
%else | ||
%define selected_microarch %{nil} | ||
%define default_microarch %{nil} | ||
%endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
from os.path import dirname, join | ||
pgo_packages = ["geant4", "vecgeom", "g4hepem", "dd4hep", "cmssw", "cmssw-patch", "cmssw-tool-conf"] | ||
pgo_packages = ["geant4", "vecgeom", "OpenBLAS", "g4hepem", "dd4hep", "cmssw", "cmssw-patch", "cmssw-tool-conf"] | ||
|
||
def packages(virtual_packages, *args): | ||
opts = args[0].options | ||
try: | ||
if (not opts.PGOGenerate) and (not opts.PGOUse): return | ||
except: | ||
return | ||
|
||
def process_pkg(vpkg, pkg): | ||
xindex = 0 | ||
pkgspec = "%s.spec" % pkg | ||
spec = [] | ||
if vpkg in virtual_packages: | ||
for line in virtual_packages[vpkg]: | ||
if not pkgspec in line: | ||
xindex += 1 | ||
spec.append(line) | ||
else: break | ||
spec.append('%define pgo_path_prefix {0}'.format('@LOCALTOP@' if pkg in ["cmssw-tool-conf"] else '%{_builddir}')) | ||
spec.append('%define pgo_package_name {0}'.format('cmssw' if pkg in ["cmssw-tool-conf"] else vpkg)) | ||
spec.append('%define {0} 1'.format('pgo_generate' if opts.PGOGenerate else 'pgo_use')) | ||
spec.append('## INCLUDE pgo/compilation_flags_pgo') | ||
if not vpkg in virtual_packages: | ||
spec.append("cmd: cat {0}/{1}".format(opts.cmsdist, pkgspec)) | ||
else: | ||
spec += virtual_packages[vpkg][xindex:] | ||
virtual_packages[vpkg] = spec[:] | ||
return | ||
|
||
for pkg in pgo_packages: | ||
spec = " echo '%%define pgo_path_prefix %s'" % ('@LOCALTOP@' if pkg in ["cmssw-tool-conf"] else '%{_builddir}') | ||
spec += "; echo '%%define pgo_package_name %s'" % ('cmssw' if pkg in ["cmssw-tool-conf"] else pkg) | ||
spec += "; echo '%%define %s 1'" % ('pgo_generate' if opts.PGOGenerate else 'pgo_use') | ||
spec += "; echo '## INCLUDE pgo/compilation_flags_pgo'" | ||
spec += "; cat %s/%s.spec" % (opts.cmsdist, pkg) | ||
virtual_packages[pkg] = spec | ||
process_pkg(pkg, pkg) | ||
for v in opts.vectorization: | ||
vpkg = "%s_%s" % (pkg,v) | ||
if vpkg in virtual_packages: | ||
pgo_packages.append(vpkg) | ||
process_pkg(vpkg, pkg) | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.