Skip to content

Conversation

@Erik-Lundell
Copy link
Collaborator

The reference model is pip installed in setup.sh.
Also install vela similarly.
Since the installation contains serialization_lib, we don't have to include it as a package
in Executorch's setup.py. The serialization_lib
is still needed as a submodule in the arm backend
to find the tosa.fbs for deserialization.

Change-Id: I24fff6c00a3961444de5d878ab169d5ba4c9156d

@Erik-Lundell Erik-Lundell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing labels Nov 26, 2024
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 26, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7077

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 5105a01 with merge base 22a75be (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 26, 2024
@freddan80
Copy link
Collaborator

@digantdesai pls have a look at this change. We've been debating it back and forth internally and it would be good to get your opinion.

The reference model is pip installed in setup.sh.
Also install vela similarily.
Since the installation contains serialization_lib,
we don't have to include it as a package
in Executorch's setup.py. The serialization_lib
is still needed as a submodule in the arm backend
to find the tosa.fbs for deserialization.

Change-Id: I24fff6c00a3961444de5d878ab169d5ba4c9156d
# any checking of compatibility.
dbg_fail(node, tosa_graph, artifact_path)

if len(input_order) > 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result of an incorrect merge, will add back. Good catch, thanks!


if not os.path.exists(intermediate_path):
os.makedirs(intermediate_path, exist_ok=True)
if custom_path is not None and not os.path.exists(custom_path):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need the latter condition with exist_ok=True?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't, this was probably just inherited from old code. But good point.

.tosa_compile_spec(tosa_version)
.set_permute_memory_format(permute_memory_to_nhwc)
.dump_intermediate_artifacts_to(intermediate_path)
.dump_intermediate_artifacts_to(custom_path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess OK to call with None?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ok. If you run on FVP and have custom_path=None you will get a crash, but with a explanatory error message.


# reference_model flatbuffers version clashes with Vela.
# go with Vela's since it newer.
# Could cause issues down the line, beware..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the solution? Where is the reference to Vela?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vela is working on widening their flatbuffer requirement, should be done within a couple of weeks

)
else:
intermediate_path = custom_path
custom_path = maybe_get_tosa_collate_path()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Erik-Lundell - keep unrelated related changes in different commits, same PR is OK.

Copy link
Collaborator Author

@Erik-Lundell Erik-Lundell Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't have to save files unless we want to with this change, we don't need to create a temporary dir when custom_path is not explicitly set -> I viewed this as a related change.

Signed-off-by: Erik Lundell <[email protected]>
Change-Id: If733617374683765bf1d49ff8f64e4c7ab9bc42d
@freddan80
Copy link
Collaborator

@digantdesai are u ok with the changes. I suspect that the docker-builds have pushed an image to the registry including this change. Hence all our CI fails.

@digantdesai
Copy link
Contributor

To avoid docker issue, lets merge this and then we can discuss async.

@digantdesai digantdesai merged commit a57b437 into pytorch:main Dec 6, 2024
108 checks passed
@Erik-Lundell Erik-Lundell deleted the pip-refmodel branch July 31, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm topic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants