-
Notifications
You must be signed in to change notification settings - Fork 183
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
Enable TF XLA, add tensorflow-xla-runtime. #9005
Merged
cmsbuild
merged 8 commits into
cms-sw:IB/CMSSW_14_1_X/master
from
riga:IB/CMSSW_14_1_X/tf_xla_aot
Mar 14, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0f8b473
Port XLA/AOT from 14_0_X.
riga cf12ea3
Add tensorflow-xla-runtime to vectorization/cmsdist_packages.py.
riga e40b72c
Add "-msse3" flag in tensorflow-xla-runtime.spec.
riga cc33bb3
Add tensorflow-xla-runtime to cmssw-tool-conf.spec.
riga f77258c
Address review comments by @smuzaffar.
riga 12f9496
Remove include.
riga a1019af
Merge branch 'IB/CMSSW_14_1_X/master' into IB/CMSSW_14_1_X/tf_xla_aot
smuzaffar c2096d0
Remove tensorflow-xla-runtime from vectorization file.
riga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 +1 @@ | ||
Requires: py3-six | ||
Requires: py3-six py3-tabulate py3-pytest py3-pytest-xdist |
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 @@ | ||
BuildRequires: py3-hatchling py3-hatch-vcs |
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 @@ | ||
Requires: py3-pytest py3-execnet |
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 @@ | ||
BuildRequires: py3-hatchling py3-hatch-vcs |
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,6 @@ | ||
<tool name="py3-tensorflow" version="@TOOL_VERSION@"> | ||
<client> | ||
<environment name="PY3_TENSORFLOW_BASE" default="@TOOL_ROOT@"/> | ||
</client> | ||
<runtime name="PATH" value="$PY3_TENSORFLOW_BASE/bin" type="path"/> | ||
</tool> |
6 changes: 6 additions & 0 deletions
6
scram-tools.file/tools/py3-tensorflow/tensorflow-includes.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<tool name="tensorflow-includes" version="@TOOL_VERSION@"> | ||
<client> | ||
<environment name="TENSORFLOW_INCLUDES_BASE" default="@TOOL_ROOT@"/> | ||
<environment name="INCLUDE" default="$TENSORFLOW_INCLUDES_BASE/@PYTHON3_LIB_SITE_PACKAGES@/tensorflow/include"/> | ||
</client> | ||
</tool> |
9 changes: 9 additions & 0 deletions
9
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<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"/> | ||
</client> | ||
<lib name="tf_xla_runtime-static"/> | ||
<use name="eigen"/> | ||
<use name="tensorflow-includes"/> | ||
</tool> |
5 changes: 5 additions & 0 deletions
5
scram-tools.file/tools/tensorflow-xla-runtime/vectorized.tmpl
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 @@ | ||
<tool name="tensorflow-xla-runtime_@TOOL_VECTORIZATION@" version="@TOOL_VERSION@"> | ||
<client> | ||
<environment name="@TOOL_VECTORIZATION_KEY@_LIBDIR" default="@TOOL_ROOT@/lib"/> | ||
</client> | ||
</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
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,23 @@ | ||
### RPM external tensorflow-xla-runtime 2.12.0 | ||
## INCLUDE cpp-standard | ||
|
||
Requires: eigen py3-tensorflow | ||
BuildRequires: cmake | ||
|
||
%prep | ||
|
||
cp -r ${PY3_TENSORFLOW_ROOT}/lib/python%{cms_python3_major_minor_version}/site-packages/tensorflow . | ||
|
||
%build | ||
|
||
export CPATH="${CPATH}:${EIGEN_ROOT}/include/eigen3" | ||
|
||
pushd tensorflow/xla_aot_runtime_src | ||
cmake . -DCMAKE_CXX_FLAGS="-fPIC -msse3" -DCMAKE_CXX_STANDARD=%{cms_cxx_standard} -DBUILD_SHARED_LIBS=OFF | ||
make %{makeprocesses} | ||
popd | ||
|
||
%install | ||
|
||
mkdir -p %{i}/lib/archive | ||
mv tensorflow/xla_aot_runtime_src/libtf_xla_runtime.a %{i}/lib/archive/libtf_xla_runtime-static.a |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@riga, we need
tensorflow-xla-runtime
to be part of cmssw dependency chain, so please add it in https://github.com/cms-sw/cmsdist/blob/IB/CMSSW_14_1_X/master/cmssw-tool-conf.specThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 👍