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

lack of attribute 'parent' #40

Closed
LinHanyueEsar opened this issue Apr 17, 2024 · 3 comments
Closed

lack of attribute 'parent' #40

LinHanyueEsar opened this issue Apr 17, 2024 · 3 comments

Comments

@LinHanyueEsar
Copy link

LinHanyueEsar commented Apr 17, 2024

when I was using AstraSim-2.0 to generate chakra traces from 1.0, using the following command:
python3 -m chakra.et_converter.et_converter
--input_type Text
--input_filename ../../../inputs/workload/ASTRA-sim-1.0/Resnet50_DataParallel.txt
--output_filename ../../../inputs/workload/ASTRA-sim-2.0/Resnet50_DataParallel
--num_npus 64
--num_dims 1
--num_passes 1
I met a bug:
DEBUG [04/17/2024 12:04:48 PM] Traceback (most recent call last):
File "/home/esar/.local/lib/python3.10/site-packages/chakra/et_converter/et_converter.py", line 106, in main
converter.convert()
File "/home/esar/.local/lib/python3.10/site-packages/chakra/et_converter/text2chakra_converter.py", line 147, in convert
self.convert_data_parallel(f, num_layers)
File "/home/esar/.local/lib/python3.10/site-packages/chakra/et_converter/text2chakra_converter.py", line 202, in convert_data_parallel
self.add_parent(fwd_comp_node, layers[idx-1].fwd_comp_node)
File "/home/esar/.local/lib/python3.10/site-packages/chakra/et_converter/text2chakra_converter.py", line 136, in add_parent
child_node.parent.append(parent_node.id)
AttributeError: parent
So I check the Node file in ./et_def/et_def.proto and find that the node don't have attribute 'parent', I add at the bottom like:
//parent
repeated uint64 parent=11;
and later it passes.

@LinHanyueEsar LinHanyueEsar changed the title lack of attribute lack of attribute 'parent' Apr 17, 2024
@bobby-b-song
Copy link

I was getting

[damped]
File "$ANACONDA_PATH/envs/chakra/lib/python3.9/site-packages/chakra/et_converter/pytorch_node.py", line 121, in parent
    return self.node_data["parent"]
KeyError: 'parent'

when trying to run the conversion tool with the trace generated by pytorch version 2.2, downgrading to 2.1 fixes it.

@TaekyungHeo
Copy link
Contributor

TaekyungHeo commented May 9, 2024

The trace_link and et_converter have been updated by the following PRs. First, please use the updated tools:

Second, ensure you use PyTorch nightly for some time to collect traces, as we are utilizing the latest features from the PyTorch profiler to properly correlate traces.

@srinivas212
Copy link
Contributor

Closing the issue. Pl reopen if you have issue w/ latest code.

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

No branches or pull requests

4 participants