- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for constant_ops (0.23 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import_test_pass.cc
MLIRContext* context = &getContext(); for (func::FuncOp func : module.getOps<func::FuncOp>()) { llvm::SmallVector<arith::ConstantOp, 4> constant_ops( func.getOps<arith::ConstantOp>()); for (auto op : constant_ops) { ShapedType shaped_type = RankedTensorType::get({1}, StringType::get(context)); DenseStringElementsAttr attr;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Oct 04 09:19:38 UTC 2022 - 5.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/stablehlo_type_utils_test.cc
const OwningOpRef<mlir::stablehlo::ConstantOp> constant_op = builder_.create<mlir::stablehlo::ConstantOp>( builder_.getUnknownLoc(), builder_.getI32IntegerAttr(0)); EXPECT_TRUE(IsStablehloOp(*constant_op)); } TEST_F(StablehloTypeUtilsTest, IsStablehloOpFailsWithArithOp) { const OwningOpRef<mlir::arith::ConstantOp> constant_op = builder_.create<mlir::arith::ConstantOp>(builder_.getUnknownLoc(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Mar 25 00:32:20 UTC 2024 - 2.1K bytes - Viewed (0) -
tensorflow/compiler/aot/tests/make_test_graphs.py
FLAGS = None def tfadd(_): x = constant_op.constant([1], name='x_const') y = constant_op.constant([2], name='y_const') math_ops.add(x, y, name='x_y_sum') def tfadd_with_ckpt(out_dir): x = array_ops.placeholder(dtypes.int32, name='x_hold') y = variable_v1.VariableV1(constant_op.constant([0]), name='y_saved') math_ops.add(x, y, name='x_y_sum')
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 15 15:25:23 UTC 2023 - 7.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/prepare_quantize.cc
return success(); } }; class ConvertArithConstToStablehloConstOp : public OpRewritePattern<arith::ConstantOp> { public: using OpRewritePattern::OpRewritePattern; LogicalResult matchAndRewrite(arith::ConstantOp op, PatternRewriter& rewriter) const override { rewriter.replaceOpWithNewOp<mlir::stablehlo::ConstantOp>(op, op.getValue());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 03 05:11:03 UTC 2024 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc
mlir::OpBuilder op_builder(&module.getBodyRegion()); module.walk([&](mlir::arith::ConstantOp const_op) { MaybeUnfoldLargeSplatConstant(&op_builder, const_op); }); } private: void MaybeUnfoldLargeSplatConstant(mlir::OpBuilder* op_builder, mlir::arith::ConstantOp const_op) const { auto splat_elements_attr =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/utils.cc
namespace mlir { namespace mhlo { ConstantOp GetScalarConstOfType(Type ty, Location loc, int64_t raw_value, OpBuilder* builder) { return builder->create<ConstantOp>(loc, hlo::getScalarOfType(ty, raw_value)); } ConstantOp GetScalarNegZeroOfType(Type ty, Location loc, OpBuilder* builder) { return builder->create<ConstantOp>(loc, hlo::getScalarNegZeroOfType(ty)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 1.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc
// This pattern checks if an i8 arith::ConstantOp tensor has all values within // the INT4 range, i.e. [-8,7] and converts it into i4 if so. This assumes that // the input is sign-extended two's complement. class CheckRangeAndConvertI8ToI4 : public OpRewritePattern<arith::ConstantOp> { public: using OpRewritePattern<arith::ConstantOp>::OpRewritePattern; LogicalResult matchAndRewrite(arith::ConstantOp op,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc
// Variables for capturing values and attributes used while creating ops. mhlo::ConvolutionOp conv_op; Operation *bcast_or_const_op; shape::ShapeOfOp shape_of_op; mhlo::ConstantOp filter; mhlo::ConstantOp multiplier; mlir::ElementsAttr filter_value, mul_value; mlir::DenseIntElementsAttr broadcast_dims; // Match and capture values/attributes. Value lhs = mul_op.getLhs();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 22:21:19 UTC 2024 - 8.3K bytes - Viewed (0) -
tensorflow/cc/saved_model/testdata/generate_chunked_models.py
import os from absl import app from absl import flags import numpy as np from tensorflow.python.compat import v2_compat from tensorflow.python.eager import def_function from tensorflow.python.framework import constant_op from tensorflow.python.lib.io import file_io from tensorflow.python.module import module from tensorflow.python.saved_model import loader_impl from tensorflow.python.saved_model import save
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 08 21:43:11 UTC 2023 - 2.8K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/internal/testdata/gen_saved_models.py
testing. """ import os from absl import app from tensorflow.python.compat import v2_compat from tensorflow.python.eager import def_function from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import tensor_spec from tensorflow.python.module import module from tensorflow.python.ops import resource_variable_ops
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Mar 06 21:32:57 UTC 2023 - 3.4K bytes - Viewed (0)