-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
Hey @samskalicky , Thanks for submitting the PR
CI supported jobs: [unix-gpu, website, centos-cpu, clang, miscellaneous, unix-cpu, windows-cpu, edge, centos-gpu, windows-gpu, sanity] Note: |
Large scale cloud end users would need this feature in 1.8. |
What is the timeline for this fix and MXNet 1.8 ? |
Support additional inputs to custom subgraph ops that are not direct dependencies to ops in the subgraph. This will enable various use cases: custom control flow ops, custom ops that maintain a state that should be saved/loaded, etc. Highlights: * Added test that uses a graph pass (addInputPass) to add a new custom input to the subgraph op * Added new optional argument (clear) to hybridize & optimize_for APIs in Gluon Block to enable multiple optimizations * refactored lib_api.h JSON utilities * added new Graph data structure utilities to simplify custom graph passes * refactored custom op registration * enhanced custom subgraph op to support additional inputs to subgraph op that is not an input to ops in the subgraph * updated subgraph & graph pass READMEs * Added error messaging from external library
Hi @HahTK the PR on master was merged, and I cherry picked the commit into this branch. Notice that I left all the previous 1.x API tests (that were removed in the PR on master).
merging this PR should be quick, get the CI to pass, one review from someone to check for missing things in 1.x and it should be good to go. |
I keep getting this weird Clojure failure:
I did a rebase, but not sure why this is failing. None of my changes affect internal operators... |
You need the link fix from 7a84fe1 |
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! with some nit
@@ -159,7 +161,7 @@ MXReturnValue inferShape(const std::unordered_map<std::string, std::string>& att | |||
unsigned kk = inshapes->at(1)[0]; | |||
unsigned m = inshapes->at(1)[1]; | |||
if (k != kk) { | |||
std::cout << "Exected first input axis 1 equals to second input axis 0" << std::endl; | |||
MX_ERROR_MSG << "Exected first input axis 1 equals to second input axis 0"; |
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.
MX_ERROR_MSG << "Exected first input axis 1 equals to second input axis 0"; | |
MX_ERROR_MSG << "Expected first input axis 1 equals to second input axis 0"; |
<< " Found output data type:" << outputs->at(0).dtype << std::endl; | ||
MX_ERROR_MSG << "Error! Expected all inputs and outputs to be the same type." | ||
<< "Found input storage type:" << inputs->at(0).stype | ||
<< " Found output storage type:" << outputs->at(0).stype |
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.
Unwanted whitespaces?
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! with some nit
Thanks! will add these todos to my next PR
Description
Backporting #18779 to v1.x
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments