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 bfloat16 to all relevant ops #3842

Closed
fdwr opened this issue Nov 16, 2021 · 10 comments · Fixed by #3960 or #6099
Closed

Add bfloat16 to all relevant ops #3842

fdwr opened this issue Nov 16, 2021 · 10 comments · Fixed by #3960 or #6099
Assignees
Labels
enhancement Request for new feature or operator operator Issues related to ONNX operators
Milestone

Comments

@fdwr
Copy link
Contributor

fdwr commented Nov 16, 2021

Bug Report

Is the issue related to model conversion?

No.

Looks like an oversight, as it's inconsistent with both Less and Equal which support bfloat16 but their combination does not, especially given LessOrEqual can be implemented as an aggregate operator ("function") of those two. The same applies to GreaterOrEqual.

Describe the bug

LessOrEqual and GreaterOrEqual should support bfloat16. Pertinent PR #2770.

System information

  • ONNX version: master 1.10
@fdwr fdwr added the bug label Nov 16, 2021
@fdwr
Copy link
Contributor Author

fdwr commented Nov 16, 2021

FYI @gramalingam, @souptc.

@fdwr
Copy link
Contributor Author

fdwr commented Nov 16, 2021

Just noticed also that Sigmoid has bfloat16 but not HardSigmoid, even though all the constituent operators (max, min, mul, add) do support bfloat16.

@jcwchen jcwchen added the operator Issues related to ONNX operators label Nov 16, 2021
@gramalingam
Copy link
Contributor

Makes sense. Looks like an oversight. We should add the missing bfloat16 type to all such ops. Would be nice to find all such ops in one go! (Eg., we had to do this for Pow and Where previously I think.)

@gramalingam
Copy link
Contributor

gramalingam commented Jan 5, 2022

Here is a list of other ops that may be missing bfloat16: acos, acosh, asin, asinh, atan, atanh, averagepool, bernoulli, celu, concatfromsequence, constantofshape, conv, convtranspose, cos, cosh, dequantizelinear, det, dynamicquantizelinear, einsum, eyelike, globalaveragepool, globalpool, globalmaxpool, gru, hardsigmoid, hardswish, if, instancenormalization, isinf, leakyrelu, loop, lstm, maxpool, maxroipool, maxunpool, multinomial, negativeloglikelihoodloss, nonmaxsuppression, onehot, optional, optionalgetelement, optionalhaselement, prelu, resize, reversesequence, rnn, roialign, round, scan, scatterlements, selu, sequenceat, sequenceconstruct, sequenceempty, sequenceerase, sequenceinsert, sequencelength, shrink, sin, sinh, softplus, softsign, splittosequence, thresholdedrelu, topk, unique.

@gramalingam
Copy link
Contributor

Adding a note to clarify that bfloat16 was added for a few selected ops, not all of the ops identified above as missing bfloat16. So, this issue is only partially closed.

@askhade
Copy link
Contributor

askhade commented Jan 26, 2022

I did not close this issue... I think it was closed becuase the PR got merged. Reopening the issue to continue to track the rest of the ops. Per our discussion will remove the 1.11 milestone tag

@askhade askhade reopened this Jan 26, 2022
@askhade askhade removed this from the 1.11 milestone Jan 26, 2022
@jcwchen
Copy link
Member

jcwchen commented Mar 4, 2022

#4051 Another fresh bfloat request for Conv op.

@jcwchen jcwchen changed the title LessOrEqual is missing bfloat16 even though Less and Equal have it. Add bfloat16 to all relevant ops Mar 30, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2023
@jcwchen
Copy link
Member

jcwchen commented Apr 25, 2023

I guess it has not been fully completed yet. Let me reopen it for tracking.

@jcwchen jcwchen reopened this Apr 25, 2023
@justinchuby justinchuby added this to the 1.16 milestone Sep 12, 2023
@justinchuby
Copy link
Contributor

We can add fp8 now too

@justinchuby justinchuby modified the milestones: 1.16, Future Jan 17, 2024
@justinchuby justinchuby added enhancement Request for new feature or operator contributions welcome and removed bug labels Feb 8, 2024
@thiagocrepaldi
Copy link
Contributor

#6071 is a duplicate - and more specific case for Conv-11 which has float16 but not bfloat16 support

thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 11, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 12, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 15, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 16, 2024
Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 17, 2024
Conversion to/from 21<->22 also implemented

Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 17, 2024
Conversion to/from 21<->22 also implemented

Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 17, 2024
Conversion to/from 21<->22 also implemented

Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 17, 2024
Conversion to/from 21<->22 also implemented

Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 17, 2024
Conversion to/from 21<->22 also implemented

Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 17, 2024
Conversion to/from 21<->22 also implemented

Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 17, 2024
Conversion to/from 21<->22 also implemented

Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
thiagocrepaldi added a commit to thiagocrepaldi/onnx that referenced this issue Apr 23, 2024
Conversion to/from 21<->22 also implemented

Fixes onnx#3842

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
github-merge-queue bot pushed a commit that referenced this issue Apr 25, 2024
Reland #6079

Fixes #3842
Fixes #6071
Fixes #4051

@gramalingam @justinchuby FYI

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
isdanni pushed a commit to isdanni/onnx that referenced this issue May 6, 2024
Reland onnx#6079

Fixes onnx#3842
Fixes onnx#6071
Fixes onnx#4051

@gramalingam @justinchuby FYI

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
Signed-off-by: isdanni <leedanni@gmail.com>
gramalingam pushed a commit to gramalingam/onnx that referenced this issue Jun 6, 2024
Reland onnx#6079

Fixes onnx#3842
Fixes onnx#6071
Fixes onnx#4051

@gramalingam @justinchuby FYI

Signed-off-by: Thiago Crepaldi <thiagofc@microsoft.com>
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for new feature or operator operator Issues related to ONNX operators
Projects
6 participants