Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 104 for constop (0.55 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/python/unfreeze_constants.cc

    absl::Status UnfreezeConstantsAndSaveVariables(
        const absl::string_view checkpoint_dir, mlir::MLIRContext &ctx,
        mlir::ModuleOp module_op) {
      TF_RETURN_IF_ERROR(RunPasses(
          /*name=*/kTfQuantConstantUnfreezingStepName, /*add_passes_func=*/
          [](mlir::PassManager &pm) {
            pm.addPass(mlir::quant::CreateUnfreezeConstantsPass());
          },
          ctx, module_op));
    
      if (const absl::Status create_dir_status =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 11:07:03 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfuse_batch_norm_pass.cc

          if (i != feature_index) {
            reduce_dim_axes.push_back(i);
          }
        }
        auto mean_dims = DenseIntElementsAttr::get(dims_type, reduce_dim_axes);
        ::mlir::TF::ConstOp reduce_dim_op =
            rewriter.create<TF::ConstOp>(bn_op.getLoc(), mean_dims);
        int64_t feature_dim_size = input_type.getDimSize(feature_index);
        auto mean_var_type = RankedTensorType::get(/*shape=*/{feature_dim_size},
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

          state.padding = rewriter.getStringAttr("VALID");
        }
        auto conv_op = static_cast<const ConcreteType *>(this)->createTFLOp(
            &state, rewriter, op->getLoc(), tf_op.getType(), input, filter, bias);
    
        rewriter.replaceOp(op, conv_op.getResult());
        return success();
      }
    
      const IntegerAttr intAttrOne;
    
     private:
      bool allow_bf16_and_f16_type_legalization_;
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

    }
    
    TF::ConstOp Create1DConstantOp(const std::vector<int>& value, Location loc,
                                   OpBuilder* builder) {
      auto type =
          mlir::RankedTensorType::get(value.size(), builder->getIntegerType(32));
      auto dense_values = mlir::DenseIntElementsAttr::get(type, value);
      return builder->create<TF::ConstOp>(loc, dense_values);
    }
    
    TF::ConstOp CreateScalarConstantOp(int value, Location loc,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

      }
    
      const auto type = RankedTensorType::get(shape, builder.getF32Type());
      const auto value_attr = DenseFPElementsAttr::get(type, values);
      return builder.create<TF::ConstOp>(loc, value_attr);
    }
    
    // Creates a 1D array with integer/float type.
    template <typename T>
    Value Create1DConstValue(OpBuilder& builder, const Location loc,
                             const SmallVector<T>& values) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/quantization/lite/tfl_to_std.cc

          auto qcast = b.create<quantfork::QuantizeCastOp>(
              q.getLoc(), q.getOutput().getType(), q.getInput());
          q.getOutput().replaceAllUsesWith(qcast);
          q.erase();
        } else if (auto q = llvm::dyn_cast<ConstOp>(op)) {
          auto value = q.getValue();
          auto type = q.getResult().getType();
          if (arith::ConstantOp::isBuildableWith(value, type)) {
            auto c = b.create<arith::ConstantOp>(q.getLoc(), q.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 02:50:01 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/unroll_batch_matmul.cc

        std::swap(rhs_shape[rhs_dims - 1], rhs_shape[rhs_dims - 2]);
      }
    
      const int64_t rows = lhs_shape[lhs_dims - 2];
      const int64_t cols = rhs_shape[rhs_dims - 1];
    
      if (lhs_shape[lhs_dims - 1] != rhs_shape[rhs_dims - 2]) {
        // Input dimensions must be compatible for multiplication.
        return failure();
      }
    
      const auto matmul_type = RankedTensorType::get({rows, cols}, element_type);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/optimize.cc

      bool isSupportedAxis(mlir::Value value, int64_t rank) const {
        auto const_op =
            dyn_cast_or_null<mlir::arith::ConstantOp>(value.getDefiningOp());
        if (!const_op) {
          return false;
        }
        auto axes = dyn_cast<DenseIntElementsAttr>(const_op.getValueAttr());
        if (!axes || axes.getNumElements() != 1) {
          return false;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfrt/tests/mlrt/tf_to_mlrt.mlir

      // CHECK-NEXT: [[PREFIX:%.*]] = tf_mlrt.constop
      %cst = "tf.Const"() {__op_key = 0: i32, value = dense<"restore_ariables"> : tensor<!tf_type.string>} : () -> tensor<!tf_type.string>
      // CHECK-NEXT: [[SLICE:%.*]] = tf_mlrt.constop
      %cst_0 = "tf.Const"()  {__op_key = 1: i32, value = dense<""> : tensor<1x!tf_type.string>} : () -> tensor<1x!tf_type.string>
      // CHECK-NEXT: [[NAME:%.*]] = tf_mlrt.constop
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 20:44:15 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

      explicit QuantizeCompositeFunctionsPass() = default;
    
      explicit QuantizeCompositeFunctionsPass(
          const QuantMethod quantization_method, const OpSet target_opset,
          const bool enable_per_channel_quantization,
          const int min_num_elements_for_weights,
          const bool enable_legacy_weight_only,
          std::optional<const std::string> mlir_dump_file_name)
          : enable_legacy_weight_only_(enable_legacy_weight_only),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
Back to top