tf.sysconfig.get_compile_flags
Stay organized with collections
Save and categorize content based on your preferences.
Returns the compilation flags for compiling with TensorFlow.
tf.sysconfig.get_compile_flags()
The returned list of arguments can be passed to the compiler for compiling
against TensorFlow headers. The result is platform dependent.
For example, on a typical Linux system with Python 3.7 the following command
prints ['-I/usr/local/lib/python3.7/dist-packages/tensorflow/include',
'-D_GLIBCXX_USE_CXX11_ABI=1', '-DEIGEN_MAX_ALIGN_BYTES=64']
print(tf.sysconfig.get_compile_flags())
Returns |
A list of strings for the compiler flags.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tf.sysconfig.get_compile_flags\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/platform/sysconfig.py#L56-L88) |\n\nReturns the compilation flags for compiling with TensorFlow.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.sysconfig.get_compile_flags`](https://www.tensorflow.org/api_docs/python/tf/sysconfig/get_compile_flags)\n\n\u003cbr /\u003e\n\n tf.sysconfig.get_compile_flags()\n\nThe returned list of arguments can be passed to the compiler for compiling\nagainst TensorFlow headers. The result is platform dependent.\n\nFor example, on a typical Linux system with Python 3.7 the following command\nprints `['-I/usr/local/lib/python3.7/dist-packages/tensorflow/include',\n'-D_GLIBCXX_USE_CXX11_ABI=1', '-DEIGEN_MAX_ALIGN_BYTES=64']` \n\n print(tf.sysconfig.get_compile_flags())\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A list of strings for the compiler flags. ||\n\n\u003cbr /\u003e"]]