Skip to content
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

Question about Chakra Trace Generated by PyTorch #151

Open
Cioccoo opened this issue Sep 6, 2024 · 2 comments
Open

Question about Chakra Trace Generated by PyTorch #151

Cioccoo opened this issue Sep 6, 2024 · 2 comments
Labels
question Further information is requested

Comments

@Cioccoo
Copy link

Cioccoo commented Sep 6, 2024

Hello, I am a beginner just starting to learn. I really appreciate the great work your team does with Chakra.

I am following the tutorial: https://github.com/mlcommons/chakra/wiki/Running-Simulation-with-Chakra
Regarding "Using Chakra Execution Trace and Kineto Traces Generated By PyTorch," I encounter an error whenever I reach the section in the purple box:

image

The error is shown below:

(astra-sim) home123: ~/Documents/astra-sim/extern/graph_frontend/chakra$ python3 -m chakra.et_converter.et_converter --input_type PyTorch --input_filename et_plus/dlrm_eg_0_plus.json --output_filename et_plus/dlrm_chakra.0.et --

Traceback (most recent call last):
  File "/miniconda3/envs/astra-sim/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/miniconda3/envs/astra-sim/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/miniconda3/envs/astra-sim/lib/python3.9/site-packages/chakra/et_converter/et_converter.py", line 9, in <module>
    from .text2chakra_converter import Text2ChakraConverter
  File "/miniconda3/envs/astra-sim/lib/python3.9/site-packages/chakra/et_converter/text2chakra_converter.py", line 8, in <module>
    from chakra.et_def.et_def_pb2 import (
  File "/miniconda3/envs/astra-sim/lib/python3.9/site-packages/chakra/et_def/et_def_pb2.py", line 9, in <module>
    from google.protobuf import runtime_version as _runtime_version
ImportError: cannot import name 'runtime_version' from 'google.protobuf' (/miniconda3/envs/astra-sim/lib/python3.9/site-packages/google/protobuf/__init__.py)

May I ask why this issue occurs? Could it be related to my version of protobuf not being compatible?

I noticed that the tutorial mentions the need for protobuf 4.x. I tried different versions like protobuf 4.21.6 and 4.24.4, with Python 3.9, and PyTorch 2.1.2 and 2.4.0, and the latest version of chakra, but I keep encountering the same error.

@Cioccoo Cioccoo added the question Further information is requested label Sep 6, 2024
@Cioccoo
Copy link
Author

Cioccoo commented Sep 6, 2024

I found a workaround to solve this problem: https://stackoverflow.com/questions/71759248/importerror-cannot-import-name-builder-from-google-protobuf-internal.

However, I still want to ask about the version requirements for Python, PyTorch, and especially Protobuf and other packages.

I always encounter version compatibility issues, especially when I want to use Chakra together with Astra-Sim 2.0.

@rafsalas19
Copy link

I'm facing a similar issue as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants