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

Project: Fake Quantization #75

Conversation

ranbir-sharma
Copy link
Contributor

Project : Fake Quantization

Project Details are as follow

  • Fake Quantization is added to the LLTFI to ensure fault injection within the targeted layers specified in the yaml files
  • Lib code is added to facilitate the process for maintaining and Quantizing / Dequantizing the values as provided
  • CMake Files are updated to build the code for Fake Quantization while setting up LLTFI

@abrahamchan
Copy link
Collaborator

abrahamchan commented Sep 3, 2024

Do you have any tests for this feature? For instance, it would be great to have an example under sample_programs/ml_sample_programs/ to demonstrate the use of fake quantization.

Also, the input_masterlist_ml.yaml should be updated with the fakeQuant option.

@ranbir-sharma
Copy link
Contributor Author

Do you have any tests for this feature? For instance, it would be great to have an example under sample_programs/ml_sample_programs/ to demonstrate the use of fake quantization.

Also, the input_masterlist_ml.yaml should be updated with the fakeQuant option.

Added Documentation in the input_masterlist_ml.yaml with examples and added error checks for fake Quantization in instrument.py

llvm_passes/core/FakeQuantizationPass.h Outdated Show resolved Hide resolved
bin/instrument.py Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.h Outdated Show resolved Hide resolved
llvm_passes/core/FakeQuantizationPass.h Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.h Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.h Outdated Show resolved Hide resolved
docs/input_masterlist_ml.yaml Outdated Show resolved Hide resolved
docs/input_masterlist_ml.yaml Outdated Show resolved Hide resolved
llvm_passes/core/FakeQuantizationPass.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@abrahamchan abrahamchan left a comment

Choose a reason for hiding this comment

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

Could you please make a second round of changes? I didn't catch the other typos in the previous review.

runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
runtime_lib/FakeQuantizationLib.cpp Outdated Show resolved Hide resolved
@ManiSadati
Copy link

Does this PR still have the unexpected large value issue for all the models?

@abrahamchan
Copy link
Collaborator

LGTM!

@abrahamchan abrahamchan merged commit dd1054e into DependableSystemsLab:fake_quantization Oct 4, 2024
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.

3 participants