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

Add ComputeEngine Property for choosing Engine #2849

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jijoongmoon
Copy link
Collaborator

Add Compute Engine Property

This PR add ComputeEngine Enum Property.
Enum elements are "cpu", "gpu", "qnn" for now.
The property format is "engine=qnn".

Self evaluation:

  1. Build test: [X]Passed [ ]Failed [ ]Skipped
  2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: jijoong.moon [email protected]

Copy link
Contributor

@EunjuYang EunjuYang left a comment

Choose a reason for hiding this comment

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

I'm glad to review this PR, initiating additional compute engine for QNN. 👍✨
This PR adds a new LayerComputeEngine property in common.h and includes it as a property. Here're some comments from my side.

Comment on lines +139 to +140
ml::train::LayerComputeEngine
getComputeEngine(const std::vector<std::string> &props) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Function prototype for getComputeEngine is missing in header. Isn't it required to be declared in header?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your comment. This getComputeEngine function will be removed in PR #2849.
It moved and renamed as "parseComputeEngine"

#endif
}

auto &ac = nntrainer::AppContext::Global();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it holds for both ml::train::LayerComputeEngine::CPU and ml::train::LayerComputeEngine::QNN?
If not, you may need to add more condition to check it.
I think it would be better to add a case to check QNN with NYI exception.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. it doesn't. This will changed in PR #2848 too.

auto &eg = nntrainer::Engine::Global();

#endif
}

auto &ac = nntrainer::AppContext::Global();
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ditto.

This PR add ComputeEngine Enum Property.
Enum elements are "cpu", "gpu", "qnn" for now.
The property format is "engine=qnn".

**Self evaluation:**
1. Build test:	 [X]Passed [ ]Failed [ ]Skipped
2. Run test:	 [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: jijoong.moon <[email protected]>
Copy link
Contributor

@djeong20 djeong20 left a comment

Choose a reason for hiding this comment

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

LGTM

// const LayerComputeEngine &compute_engine = LayerComputeEngine::GPU)
// {
// return createLayer(LayerType::LAYER_RMSNORM, properties, compute_engine);
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

let's remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants