Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for DenseIntElementsAttr (0.17 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils_test.cc

      Value value = CreateConstValue<int8_t>(builder, module->getLoc(),
                                             unpacked_shape, unpacked_values);
      Value packed_value = PackOperand(builder, module->getLoc(), value, pack_dim);
      DenseIntElementsAttr packed_value_attr;
      ASSERT_TRUE(matchPattern(packed_value, m_Constant(&packed_value_attr)));
    
      ShapedType packed_shape_type =
          mlir::dyn_cast<ShapedType>(packed_value.getType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.cc

      auto input_type = mlir::dyn_cast<RankedTensorType>(input.getType());
      if (!input_type) return success();
      int64_t rank = input_type.getRank();
    
      DenseIntElementsAttr dims_attr;
      if (!matchPattern(dims, m_Constant(&dims_attr))) return success();
      for (const auto &dim_pair : llvm::enumerate(dims_attr)) {
        int64_t cur_dim = dim_pair.value().getSExtValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfold_splat_constant_pass.cc

            const_op->getLoc(),
            DenseElementsAttr::get(
                RankedTensorType::get(/*shape=*/{}, element_type),
                splat_elements_attr.getSplatValue<Attribute>()));
        auto broadcast_dims = DenseIntElementsAttr::get(
            RankedTensorType::get(/*shape=*/{0}, op_builder->getI64Type()),
            llvm::SmallVector<int64_t>{});
        mhlo::BroadcastInDimOp broadcast_in_dim_op =
            op_builder->create<mhlo::BroadcastInDimOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.cc

        const int ceil_pad_right = pool.kw - remaining_right;
        pad_right = ceil_pad_right - pool.pw;
      }
    
      return {pool.ph, pad_bottom, pool.pw, pad_right};
    }
    
    DenseIntElementsAttr GetPadOpAttr(Builder& builder, CompositeOp op) {
      const TorchAvgPoolData pool = GetTorchAvgPoolData(op);
    
      const auto values = GetPadOpPaddingValues(pool);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc

          return;
        }
    
        op_builder->setInsertionPoint(const_op);
        mlir::arith::ConstantOp fill_shape =
            op_builder->create<mlir::arith::ConstantOp>(
                const_op->getLoc(),
                DenseIntElementsAttr::get(
                    tensorflow::GetTypeFromTFTensorShape(
                        {splat_elements_attr.getType().getRank()},
                        op_builder->getI64Type()),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.cc

                                converter.quantizeFloatToInt(floatAttr.getValue()));
      }
    
      return nullptr;
    }
    
    /// Converts a real expressed DenseFPElementsAttr to a corresponding
    /// DenseElementsAttr (typically DenseIntElementsAttr) containing quantized
    /// storage values assuming the given quantizedElementType and converter.
    static DenseElementsAttr convertDenseFPElementsAttr(
        DenseFPElementsAttr realFPElementsAttr,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc

      auto ranked_ty = mlir::dyn_cast<RankedTensorType>(input_ty);
      if (!ranked_ty) return UnrankedTensorType::get(element_ty);
      int64_t rank = ranked_ty.getRank();
    
      DenseIntElementsAttr indices;
      if (!matchPattern(reduction_indices, m_Constant(&indices))) {
        // Output type is unranked if reduction indices are not constant and reduced
        // dimensions are not kept.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/debug/debug_test.cc

        builder.setInsertionPointToStart(func.addEntryBlock());
        llvm::SmallVector<int> shape{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        builder.create<mlir::arith::ConstantOp>(
            builder.getUnknownLoc(),
            mlir::DenseIntElementsAttr::get(
                mlir::RankedTensorType::get(shape.size(), builder.getI32Type()),
                shape));
        builder.create<mlir::func::ReturnOp>(builder.getUnknownLoc());
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 17 11:15:16 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top