[TF XLA AOT] Add cmake support for the standalone XLA AOT runtime
Example [generated Makefile](https://gist.github.com/mtrofin/fea40c80748d958b22a7ca655b52a730) PiperOrigin-RevId: 299226330 Change-Id: Ia9969afefe3ac6d84b4eccbb93fdbd6f6341c955
This commit is contained in:
parent
e0857cc6da
commit
06631493fd
tensorflow
@ -399,5 +399,6 @@ tensorflow/tools/pip_package/pip_smoke_test.py
|
||||
tensorflow/tools/pip_package/setup.py
|
||||
tensorflow/tools/pip_package/simple_console.py
|
||||
tensorflow/tools/pip_package/simple_console_for_windows.py
|
||||
tensorflow/tools/pip_package/xla_build/CMakeLists.txt
|
||||
tensorflow/virtual_root_template_v1.__init__.py
|
||||
tensorflow/virtual_root_template_v2.__init__.py
|
@ -71,6 +71,11 @@ filegroup_as_file(
|
||||
dep = "//tensorflow/compiler/tf2xla:xla_compiled_cpu_runtime_srcs",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "xla_cmake",
|
||||
srcs = ["xla_build/CMakeLists.txt"],
|
||||
)
|
||||
|
||||
# Add dynamic kernel dso files here.
|
||||
DYNAMIC_LOADED_KERNELS = [
|
||||
"//tensorflow/core/kernels:libtfkernel_sobol_op.so",
|
||||
@ -83,6 +88,7 @@ COMMON_PIP_DEPS = [
|
||||
"setup.py",
|
||||
":included_headers",
|
||||
":xla_compiled_cpu_runtime_srcs.txt_file",
|
||||
":xla_cmake",
|
||||
"//tensorflow:tensorflow_py",
|
||||
"//tensorflow/compiler/tf2xla:xla_compiled_cpu_runtime_hdrs",
|
||||
"//tensorflow/compiler/tf2xla:xla_compiled_cpu_runtime_srcs",
|
||||
|
@ -69,6 +69,7 @@ function copy_xla_aot_runtime_sources() {
|
||||
echo "Missing xla source file: ${file}" 1>&2
|
||||
fi
|
||||
done
|
||||
cp tensorflow/tools/pip_package/xla_build/CMakeLists.txt "${dst_dir}"
|
||||
popd
|
||||
}
|
||||
|
||||
|
19
tensorflow/tools/pip_package/xla_build/CMakeLists.txt
Normal file
19
tensorflow/tools/pip_package/xla_build/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
cmake_minimum_required(VERSION 3.4.3)
|
||||
|
||||
file(GLOB_RECURSE TF_RUNTIME_SRC "*.cc")
|
||||
add_library(tf_xla_runtime_objects OBJECT
|
||||
${TF_RUNTIME_SRC}
|
||||
)
|
||||
|
||||
target_include_directories(tf_xla_runtime_objects PRIVATE ../include)
|
||||
target_compile_options(tf_xla_runtime_objects PRIVATE
|
||||
-ftemplate-backtrace-limit=0
|
||||
-Wno-ignored-attributes
|
||||
-Wno-deprecated-copy
|
||||
-Wno-cast-qual
|
||||
-Wno-sign-compare
|
||||
)
|
||||
|
||||
add_library(tf_xla_runtime STATIC
|
||||
$<TARGET_OBJECTS:tf_xla_runtime_objects>
|
||||
)
|
Loading…
Reference in New Issue
Block a user