Skip to content

Bunch of fixes and changes #58

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

Open
wants to merge 21 commits into
base: devel
Choose a base branch
from
Open

Conversation

lukamac
Copy link
Contributor

@lukamac lukamac commented Apr 10, 2025

I have been working on adding support for an updated Neureka gvsoc model. Furthermore, I was writing a script that fakes quantization and wanted to use the Generic target for testing it.
This is a collection of small fixes and changes I needed for this. I am creating a pull request now because I'm abandoning the effort in the Generic platform and going straight for the siracusa platform.

Best reviewed commit by commit.

Added

  • check for CMAKE variable
  • tensor name mangling
  • identity operation removal
  • _unpack_const helper function to NodeParser to allow for node attributes that are direct Constant tensors or direct numpy values
  • load_file_to_local in dory_mem as a way to load values directly to a local memory (not ram). needed for copying values from flash to wmem needed for Neureka v2
  • add_gvsoc_v2_emulation macro - changed the naming to reflect that it is the same macro like in pulp-sdk but using a different (standalone) gvsoc, added target argument to it to allow reuse. This might clash with whatever has been cooked in parallel on the topic of standalone gvsoc.

Changed

  • duplicateConstants now also duplicate constant nodes
  • check float output define in DeeployTest Generic platform
  • kernel_shape now inferred from weight shape if not present as per ONNX spec
  • USE_NEUREKA moved into TargetLibraries where it's closer to pulp-nnx
  • hex dumping logic for pulp platforms in prep for neureka v2 where I need to save weights to flash and move them during runtime to wmem

Fixed

  • RequantShift when log2d is 0
  • missing math.h headers
  • clang on mac doesn't support -Wl,--gc-sections flag, moved it into each target and for host it's checking now for host system
  • --ffast-math caused numerical errors on generic so moved into each target and removed from that one since I'm imagining it as the debug target
  • Gather kernel on generic target

PR Merge Checklist

  1. The PR is rebased on the latest devel commit and pointing to devel.
  2. Your PR reviewed and approved.
  3. All checks are passing.
  4. The CHANGELOG.md file has been updated.
  5. If the docker was modified, change back its link after review.

lukamac added 3 commits May 6, 2025 13:35
The ONNX spec defines kernel_shape as optional because it can be
inferred from the weight's shape. This commit changes the parser to
allow for that.
@lukamac lukamac force-pushed the bag-of-fix branch 3 times, most recently from 6a9546a to 1889383 Compare May 7, 2025 12:47
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

Successfully merging this pull request may close these issues.

1 participant