Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for DenseIntElementsAttr (0.2 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

    namespace {
    
    // Returns 1D 64-bit dense elements attribute with the given values.
    static DenseIntElementsAttr GetI64ElementsAttr(ArrayRef<int64_t> values,
                                                   Builder *builder) {
      RankedTensorType ty = tensorflow::GetTypeFromTFTensorShape(
          {static_cast<int64_t>(values.size())}, builder->getIntegerType(64));
      return DenseIntElementsAttr::get(ty, values);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

        auto strides_attr_type =
            mlir::dyn_cast<RankedTensorType>(strides_attr.getType());
    
        DenseIntElementsAttr begin_elem_attr;
        DenseIntElementsAttr end_elem_attr;
        DenseIntElementsAttr strides_elem_attr;
    
        if (!begin_attr_type ||
            !matchPattern(begin_attr, m_Constant(&begin_elem_attr))) {
          return failure();
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

      "std::distance($0.use_begin(), $0.use_end()) == 2">>;
    def AxesIsLastDimension : Constraint<CPred<
      "$0.cast<DenseIntElementsAttr>().getNumElements() == 1 && "
      "($0.cast<DenseIntElementsAttr>().getValues<APInt>()[0] == "
      "$1.getType().cast<ShapedType>().getRank() - 1 || $0.cast<DenseIntElementsAttr>().getValues<int32_t>()[0] == -1)">>;
    
    // Convert exp(x)/sum(exp(x)) into softmax.
    def OptimizeToSoftmax : Pat<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

              return allow_tensorlist_pass_through_
                         ? rewriter.notifyMatchFailure(op, error_info)
                         : op.emitOpError(error_info);
            }
          }
        }
    
        DenseIntElementsAttr dense_elem_attr;
        if (matchPattern(element_shape, m_Constant(&dense_elem_attr))) {
          // Note: It's technically unsafe to rewrite
          //     TensorListReserve(num_element, element_shape)
          // to
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

          DenseFPElementsAttr::get(scale_type,
                                   {static_cast<float>(qtype.getScale())}));
      zero_point = rewriter.create<TF::ConstOp>(
          loc, zero_point_type,
          DenseIntElementsAttr::get(zero_point_type,
                                    {static_cast<int32_t>(qtype.getZeroPoint())}));
      return success(scale && zero_point);
    }
    
    LogicalResult CreateUniformQuantizedPerAxisTypeParams(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

    namespace tensorflow {
    namespace tf2xla {
    namespace internal {
    
    namespace {
    
    using llvm::ArrayRef;
    using llvm::SmallVector;
    using mlir::Block;
    using mlir::BlockArgument;
    using mlir::DenseIntElementsAttr;
    using mlir::IRMapping;
    using mlir::Location;
    using mlir::LogicalResult;
    using mlir::ModuleOp;
    using mlir::OpBuilder;
    using mlir::Operation;
    using mlir::OperationPass;
    using mlir::OpOperand;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

                  });
        } else if (isa<stablehlo::ConvertOp>(filter_op) &&
                   isa<stablehlo::ConstantOp>(
                       filter_op->getOperand(0).getDefiningOp())) {
          filter_i8_value_attr = mlir::cast<DenseIntElementsAttr>(
              cast<stablehlo::ConstantOp>(filter_op->getOperand(0).getDefiningOp())
                  .getValue());
        }
    
        // Create Uniform Quantized constant for the filter.
        auto subtract_op =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

                                              builder));
      }
      if (op_name == "tfl.reshape") {
        // Flattens reshape ops when more than one dimension shape operand is given.
        mlir::DenseIntElementsAttr shape_attr;
        if (matchPattern(op_state.operands[1], m_Constant(&shape_attr))) {
          auto shape_ty =
              op_state.operands[1].getType().dyn_cast<RankedTensorType>();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting.cc

           llvm::make_early_inc_range(block->getOps<TF::VarIsInitializedOp>())) {
        builder.setInsertionPoint(op);
        if (!const_true)
          const_true = builder.create<TF::ConstOp>(
              op.getLoc(),
              DenseIntElementsAttr::get(
                  RankedTensorType::get(/*shape=*/{}, builder.getI1Type()), true));
    
        op.getIsInitialized().replaceAllUsesWith(const_true);
        op.erase();
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
Back to top