-
Notifications
You must be signed in to change notification settings - Fork 698
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
[ExecutionEngine] Create runctx and execute(ctx) functions #1907
Conversation
@@ -83,6 +83,8 @@ class ExecutionEngine final { | |||
|
|||
/// Runs a single execution of the function. | |||
void run(); | |||
/// Context aware single execution of the function | |||
void runctx(Context &ctx); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
LGTM! Few nits.
@@ -16,6 +16,8 @@ | |||
#ifndef GLOW_BACKENDS_COMPILEDFUNCTION_H | |||
#define GLOW_BACKENDS_COMPILEDFUNCTION_H | |||
|
|||
#include "glow/Graph/Context.h" | |||
|
|||
#include <unordered_map> |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -83,6 +83,8 @@ class ExecutionEngine final { | |||
|
|||
/// Runs a single execution of the function. | |||
void run(); | |||
/// Context aware single execution of the function |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -28,6 +30,7 @@ class CompiledFunction { | |||
|
|||
/// Execute the network. | |||
virtual void execute() = 0; | |||
virtual void execute(Context &ctx) = 0; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
@gcatron I think that it would be better to change run to run(ctx). Later, when we finish the migration we can remove compile(ctx).
Also, have you emailed the partners mailing list to let them know about this change?
@@ -83,6 +83,8 @@ class ExecutionEngine final { | |||
|
|||
/// Runs a single execution of the function. | |||
void run(); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -55,6 +55,8 @@ class InterpreterFunction final : public CompiledFunction { | |||
///@{ | |||
~InterpreterFunction() override; | |||
|
|||
void execute(Context &ctx) override; | |||
|
|||
void execute() override; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -28,6 +30,7 @@ class CompiledFunction { | |||
|
|||
/// Execute the network. | |||
virtual void execute() = 0; | |||
virtual void execute(Context &ctx) = 0; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -28,6 +30,9 @@ class CompiledFunction { | |||
|
|||
/// Execute the network. | |||
virtual void execute() = 0; | |||
/// Execute the network and allocate Placeholder memory with given | |||
/// Context providing mapping between Placeholder and populated tensor. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@gcatron Looks good to me. Please make sure to squash the commits. |
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.
cool!
Please, make sure to resolve conflicts and good to go. re squashing, you could also select an option to "squash and merge" on this PR, up to yous |
Updated tests to use new function signatures
ad6c05f
to
5ebbbfc
Compare
Description: Create runctx and execute(ctx) functions for moving placeholder memory allocation from compile time to run time and update tests.
Testing: Ninja all
Documentation: N/A
Progress on #1904 This would bring us to completion of the second step.