NVIDIA / nvtx-plugins

Python bindings for NVTX
https://docs.nvidia.com/deeplearning/frameworks/nvtx-plugins/user-guide/docs/en/stable/
Apache License 2.0
66 stars 15 forks source link

Build from source without TensorFlow #15

Closed RizhaoCai closed 4 years ago

RizhaoCai commented 4 years ago

Hi, I am using Jetson TX2 and thus I must build nvtx from source. However, I am using PyTorch and TensorRT. Can I build it without tensorflow?

INFO: Unable to build TensorFlow plugin, will skip it.

Traceback (most recent call last):
  File "/home/nvidia/code/nvtx-plugins/setup_utils.py", line 70, in check_tf_version
    import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nvidia/code/nvtx-plugins/setup_utils.py", line 372, in build_extensions
    build_tf_extension(self, extension, options)
  File "/home/nvidia/code/nvtx-plugins/setup_utils.py", line 393, in build_tf_extension
    check_tf_version()
  File "/home/nvidia/code/nvtx-plugins/setup_utils.py", line 79, in check_tf_version
    'import tensorflow failed, is it installed?\n\n%s' % traceback.format_exc()
distutils.errors.DistutilsPlatformError: import tensorflow failed, is it installed?

Traceback (most recent call last):
  File "/home/nvidia/code/nvtx-plugins/setup_utils.py", line 70, in check_tf_version
    import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'

===========================================================================================
error: TensorFlow plugin: `nvtx.plugins.tf.lib.nvtx_ops` failed to build. Aborting.
DEKHTIARJonathan commented 4 years ago

This project is currently only targeting Tensorflow. For PyTorch you can use the following: https://pytorch.org/docs/stable/cuda.html#nvidia-tools-extension-nvtx