Yield op supports bf16 (#10035)

This commit is contained in:
ashari4 2021-12-14 13:12:37 -08:00 committed by GitHub
parent 703becd796
commit af71da0ac6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2955,7 +2955,7 @@ Return true if all elements are true and false otherwise.
/*min_arity*/ 0)
.Attr("non_differentiable_outputs", "The indices of the module outputs that doesn't have a gradient.", AttributeProto::INTS, OPTIONAL_VALUE)
.Attr("full_shape_outputs", "The indices of the module outputs that must have full shape.", AttributeProto::INTS)
.TypeConstraint("T", OpSchema::all_tensor_types(), "Allow inputs and outputs to be any kind of tensor.")
.TypeConstraint("T", OpSchema::all_tensor_types_with_bfloat(), "Allow inputs and outputs to be any kind of tensor.")
.TypeAndShapeInferenceFunction([](ONNX_NAMESPACE::InferenceContext& ctx) {
auto non_differentiable_outputs = ctx.getAttribute("non_differentiable_outputs");
std::unordered_set<size_t> non_differentiable_outputs_indices{};