-
Notifications
You must be signed in to change notification settings - Fork 32
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
Added Cpp Inferencing API to generate the text #156
Conversation
eb7df46
to
454fa96
Compare
can you move the code files from examples/xyz.cpp to examples/cpp_execution/xyz.cpp? |
454fa96
to
7b209af
Compare
Can you add a readme.md to cpp_execution directory? |
95c053c
to
99158e7
Compare
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
99158e7
to
15bb5e1
Compare
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>
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>
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add
from QEfficient.utils.logging_utils import logger
Replace all print statements with
logger.info
Also, please paste a photo/log of running this file for any model here.
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>
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>
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
examples/cpp_execution/README.md
Outdated
make -j 8 | ||
|
||
# Run the python script to get the generated text | ||
cd ../../../ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required? Can we not run the file from any other path?
examples/cpp_execution/README.md
Outdated
|
||
## Prerequisite | ||
1. PyBind11 | ||
2. Cpp17 or above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this clear enough, it's better to include what gcc version you have tested on. You can add a line saying the below readme file is validated with cpp version ** and gcc version **.
examples/cpp_execution/README.md
Outdated
This example demonstrates how to execute a model on AI 100 using Efficient Transformers and C++ APIs. The Efficient Transformers library is utilized for transforming and compiling the model, while the QPC is executed using C++ APIs. It is tested on both x86 and ARM platform. | ||
|
||
## Prerequisite | ||
1. PyBind11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead add pip3 install pybind11
try: | ||
import InferenceSetIOBuffer # noqa: E402 | ||
except ImportError: | ||
logger.info("Error importing InferenceSetIOBuffer Module") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise error here. We should not continue execution when we are not able to import the SO file
except ImportError: | ||
logger.info("Error importing InferenceSetIOBuffer Module") | ||
else: | ||
logger.info("so file's folder not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise error saying FileNotFoundError("Please follow README instructions to first compile the cpp files")
aic_enable_depth_first: bool = False, | ||
mos: int = -1, | ||
batch_size: int = 1, | ||
full_batch_size: Optional[int] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
enable_debug_logs: bool = False, | ||
stream: bool = True, | ||
full_batch_size: Optional[int] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
340cab0
to
b26c3d9
Compare
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com>
Signed-off-by: Onkar Chougule <quic_ochougul@quicinc.com>
* Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * Added Cpp Inferencing API to generate the text Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> * fixed rasing errors and README Signed-off-by: Onkar Chougule <quic_ochougul@quicinc.com> --------- Signed-off-by: Asmita Goswami <quic_asmigosw@quicinc.com> Signed-off-by: Onkar Chougule <quic_ochougul@quicinc.com> Co-authored-by: Onkar Chougule <quic_ochougul@quicinc.com>
This example demonstrates how to execute a model on AI 100 using Efficient Transformers and C++ APIs. The Efficient Transformers library is utilized for transforming and compiling the model, while the QPC is executed using C++ APIs.