-
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.
Merge branch 'IB/CMSSW_14_1_X/master' into Rivet4
- Loading branch information
Showing
24 changed files
with
135 additions
and
39 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BuildRequires: py3-pip py3-setuptools py3-wheel | ||
Requires: py3-PyYAML py3-cmsml | ||
|
||
%define github_user cms-externals | ||
%define tag df4bfd35dfed51d7c6ff0367ebc78093dfcc7d1d | ||
%define branch master | ||
%define source0 git+https://github.com/%{github_user}/cms-tfaot.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz | ||
|
||
# copy test models | ||
%define PipPostInstall \ | ||
mkdir -p %{i}/share; \ | ||
cp -r cmsdist-tmp/pip-req-build-*/test_models %{i}/share/ |
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
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
5 changes: 3 additions & 2 deletions
5
scram-tools.file/tools/tensorflow-xla-runtime/tensorflow-xla-runtime.xml
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,9 +1,10 @@ | ||
<tool name="tensorflow-xla-runtime" version="@TOOL_VERSION@"> | ||
<client> | ||
<environment name="TENSORFLOW_XLA_RUNTIME_BASE" default="@TOOL_ROOT@"/> | ||
<environment name="LIBDIR" default="$TENSORFLOW_XLA_RUNTIME_BASE/lib/archive"/> | ||
<environment name="LIBDIR" default="$TENSORFLOW_XLA_RUNTIME_BASE/lib"/> | ||
</client> | ||
<lib name="tf_xla_runtime-static"/> | ||
<lib name="tf_xla_runtime"/> | ||
|
||
<use name="eigen"/> | ||
<use name="tensorflow-includes"/> | ||
</tool> |
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,12 @@ | ||
--- tensorflow/xla_aot_runtime_src/CMakeLists.txt 2024-03-24 08:28:34.000000000 +0100 | ||
+++ tensorflow/xla_aot_runtime_src/CMakeLists.txt 2024-03-25 11:17:58.108587945 +0100 | ||
@@ -14,6 +14,8 @@ | ||
-Wno-sign-compare | ||
) | ||
|
||
-add_library(tf_xla_runtime STATIC | ||
+find_package(absl REQUIRED) | ||
+add_library(tf_xla_runtime SHARED | ||
$<TARGET_OBJECTS:tf_xla_runtime_objects> | ||
) | ||
+target_link_libraries(tf_xla_runtime absl::strings absl::str_format_internal) |
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,41 @@ | ||
## tfaot common compilation and requirement file | ||
## specs including this file should provide: | ||
## 1. a variable %{aot_config}, pointing to the aot config file of the model to compile (required) | ||
## 2. a variable %{aot_source}, referring to a fetched source to unpack during %prep (optional) | ||
## (in this case a "Source" should be defined and %{aot_source} is likely %{n}-%{realversion}) | ||
|
||
BuildRequires: py3-cms-tfaot | ||
Requires: tensorflow-xla-runtime | ||
|
||
%ifarch ppc64le | ||
%define build_arch powerpc64le-unknown-linux-gnu | ||
%else | ||
%define build_arch %{_arch}-unknown-linux-gnu | ||
%endif | ||
|
||
%prep | ||
%if "%{?aot_source}" | ||
%setup -n %{aot_source} | ||
%endif | ||
|
||
%build | ||
cms_tfaot_compile \ | ||
--aot-config "%{aot_config}" \ | ||
--tool-name "%{n}" \ | ||
--tool-base "%{i}" \ | ||
--output-directory compiled_model \ | ||
--additional-flags="--target_triple %{build_arch}" | ||
|
||
%install | ||
mkdir -p %{i}/lib | ||
mv compiled_model/*.o %{i}/lib/ | ||
|
||
mkdir -p %{i}/include/%{n} | ||
mv compiled_model/*.h %{i}/include/%{n} | ||
|
||
mkdir -p %{i}/etc/scram.d | ||
mv compiled_model/%{n}.xml %{i}/etc/scram.d/ | ||
|
||
%post | ||
%{relocateConfig}etc/scram.d/%{n}.xml | ||
%relocateConfigAll include/%{n} *.h |
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,5 @@ | ||
### RPM external tfaot-model-test-multi 1.0.1 | ||
|
||
%define aot_config $PY3_CMS_TFAOT_ROOT/share/test_models/multi/aot_config.yaml | ||
|
||
## INCLUDE tfaot-compile |
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,5 @@ | ||
### RPM external tfaot-model-test-simple 1.0.1 | ||
|
||
%define aot_config $PY3_CMS_TFAOT_ROOT/share/test_models/simple/aot_config.yaml | ||
|
||
## INCLUDE tfaot-compile |
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,3 @@ | ||
# test models needed by unit tests in PhysicsTools/TensorFlowAOT | ||
Requires: tfaot-model-test-simple | ||
Requires: tfaot-model-test-multi |