Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix InferType logic in operators #16757

Open
18 tasks
anirudh2290 opened this issue Nov 8, 2019 · 3 comments
Open
18 tasks

Fix InferType logic in operators #16757

anirudh2290 opened this issue Nov 8, 2019 · 3 comments

Comments

@anirudh2290
Copy link
Member

anirudh2290 commented Nov 8, 2019

Description

Some operators are missing logic for reverse inference: inferring the type of inputs from outputs. Instead, exception is thrown if input dtype is -1.

Also, InferType logic of operators should throw an exception only if both input and output are defined and incompatible with each other. For example. if inputs to an op are -1 and output is -1, the infertype logic should return false, instead of throwing an exception. It should throw an exception only if the types are incompatible: for example both input types and output types are inferred but input types are not compatible with output types.

The above point is important because the InferType NNVM pass does both forward and backward inference. So, sometimes output and input can both be -1 in forward inference but in the backward inference both these values can be inferred.

Operators Impacted

  • fft
  • ifft
  • deformable_convolution
  • multi_sum_sq
  • SequenceReverse
  • Convolution_v1
  • RNN
  • UpSampling
  • BatchNorm
  • Deconvolution
  • LRN
  • Convolution
  • Embedding
  • split_v2
  • SVMOutput
  • SequenceMask
  • SoftmaxOutput
  • BatchNorm_v1

The existing issues with ops was brought up @ptrendx in #16748

@anirudh2290 anirudh2290 changed the title Exceptions thrown in InferType before doing reverse inference Fix InferType logic in operators Nov 8, 2019
@samskalicky
Copy link
Contributor

@anirudh2290 Can we make this a feature request and change title to "Improve InferTYpe ..." instead of a bug?

@anirudh2290
Copy link
Member Author

It's a bug

@anirudh2290
Copy link
Member Author

un-assigning myself since i am not working on this currently. if someone is interested, please go ahead.

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

No branches or pull requests

2 participants