Skip to content

Adding compilation support for io_encrypt flag #393

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

Merged
merged 5 commits into from
May 8, 2025

Conversation

asmigosw
Copy link
Contributor

@asmigosw asmigosw commented May 8, 2025

As part of Model-IP I/O encryption feature qaic-exec has added a new command line option: -io-encrypt to enable support for decryption/encryption of network I/O.
Added support in Qeff to pass this param to qaic-exec when a model needs to be compiled with I/O encryption support.

CLI command: python -m QEfficient.cloud.infer --model_name gpt2 --batch_size 1 --prompt_len 32 --ctx_len 128 --mxfp6 --num_cores 16 --device_group [0] --prompt "My name is" --mos 1 --aic_enable_depth_first --io-encrypt "chacha20"

Note: If the flag is passed via infer CLI, CLI will exit after QPC generation.

Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Copy link
Contributor

@abukhoy abukhoy left a comment

Choose a reason for hiding this comment

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

I think that we should add these compilation params at somewhere either in the help section or in the docs for future reference. Otherwise, we may not know how many params we have incorporated till now. Just a thought, what do you think!?

@asmigosw
Copy link
Contributor Author

asmigosw commented May 8, 2025

I think that we should add these compilation params at somewhere either in the help section or in the docs for future reference. Otherwise, we may not know how many params we have incorporated till now. Just a thought, what do you think!?

You can get info on all these extra params using: /opt/qti-aic/exec/qaic-exec -help

asmigosw added 3 commits May 8, 2025 13:13
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
@@ -1635,6 +1635,11 @@ def compile(
**compiler_options,
)

if compiler_options.get("io_encrypt", None):
Copy link
Contributor

Choose a reason for hiding this comment

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

This should happen in the base class. User can pass this flag for any auto model class

@quic-rishinr quic-rishinr merged commit 4da283e into quic:main May 8, 2025
4 of 5 checks passed
mohiso22 pushed a commit to mohiso22/efficient_transformers that referenced this pull request May 14, 2025
As part of Model-IP I/O encryption feature qaic-exec has added a new
command line option: `-io-encrypt` to enable support for
decryption/encryption of network I/O.
Added support in Qeff to pass this param to qaic-exec when a model needs
to be compiled with I/O encryption support.

CLI command: `python -m QEfficient.cloud.infer --model_name gpt2
--batch_size 1 --prompt_len 32 --ctx_len 128 --mxfp6 --num_cores 16
--device_group [0] --prompt "My name is" --mos 1
--aic_enable_depth_first --io-encrypt "chacha20"`

Note: If the flag is passed via infer CLI, CLI will exit after QPC
generation.

---------

Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Mohit Soni <quic_mohisoni@quicinc.com>
mohiso22 pushed a commit to mohiso22/efficient_transformers that referenced this pull request May 14, 2025
As part of Model-IP I/O encryption feature qaic-exec has added a new
command line option: `-io-encrypt` to enable support for
decryption/encryption of network I/O.
Added support in Qeff to pass this param to qaic-exec when a model needs
to be compiled with I/O encryption support.

CLI command: `python -m QEfficient.cloud.infer --model_name gpt2
--batch_size 1 --prompt_len 32 --ctx_len 128 --mxfp6 --num_cores 16
--device_group [0] --prompt "My name is" --mos 1
--aic_enable_depth_first --io-encrypt "chacha20"`

Note: If the flag is passed via infer CLI, CLI will exit after QPC
generation.

---------

Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Mohit Soni <quic_mohisoni@quicinc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants