Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 263 for created (0.43 sec)

  1. tensorflow/compiler/jit/xla_launch_util_test.cc

      EXPECT_TRUE(xla::LiteralTestUtil::Equal(
          *literal1, xla::LiteralUtil::CreateR2<int32_t>({{1, 2, 3}})));
    
      std::shared_ptr<xla::Literal> literal2 = *exec_args[1]->ToLiteralSync();
      EXPECT_TRUE(xla::LiteralTestUtil::Equal(
          *literal2, xla::LiteralUtil::CreateR2<int32_t>({{4, 5, 6}})));
    }
    
    TEST_F(PjRtExecutionUtilTest, PreparePjRtExecutableArgumentsVariableInputs) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

        auto new_shape_const = rewriter.create<arith::ConstantOp>(
            weight_op->getLoc(), shape_spec_type, new_shape_const_attr);
        auto reshape_op = rewriter.create<TF::ReshapeOp>(
            weight_op->getLoc(), new_shape, weight_op->getResult(0),
            new_shape_const);
        op->setOperand(weight_operand_idx, reshape_op);
    
        // Create a new function with preprocessed types.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc

        IntegerAttr zp_attr;
        if (!matchPattern(zp, m_Constant(&zp_attr))) {
          return failure();
        }
        rewriter.setInsertionPoint(zp.getDefiningOp());
        auto zp_tensor = rewriter.create<TF::ConstOp>(
            loc, RankedTensorType::get({}, zp.getType()), zp_attr);
        auto zp_cast = rewriter.create<CastOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

        rewriter.setInsertionPointAfter(preceding_sc_op);
        auto fcast_op = rewriter.create<TF::CastOp>(
            preceding_sc_op->getLoc(), dq_arg_type.clone(rewriter.getF32Type()),
            preceding_sc_op.getResult());
    
        // Create a new AvgPool op with float type.
        TF::AvgPoolOp float_avg_pool_op = rewriter.create<TF::AvgPoolOp>(
            avg_pool_op->getLoc(),
            avg_pool_op.getType().clone(rewriter.getF32Type()),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.cc

        if (constant.getType().getRank() != 2) return failure();
    
        // Create a tfl.transpose op that performs ZX transpose on `input`.
        auto create_z_x_transpose_op = [&](Value input) -> Value {
          RankedTensorType input_type =
              mlir::cast<RankedTensorType>(input.getType());
          const int input_rank = input_type.getRank();
    
          // Create a 1D I32 tensor for representing the dimension permutation.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util_test.cc

      context.loadDialect<mlir::tf_device::TensorFlowDeviceDialect>();
      mlir::OwningOpRef<mlir::ModuleOp> module_ref =
          mlir::ModuleOp::create(mlir::UnknownLoc::get(&context));
      mlir::OpBuilder builder(module_ref->getBodyRegion());
    
      llvm::SmallVector<mlir::Type, 8> result_types;
      auto cluster = builder.create<mlir::tf_device::ClusterOp>(
          mlir::UnknownLoc::get(&context), result_types);
      cluster->setAttr(kNumCoresPerReplicaAttr,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc

          if (operand.getType() != expected_type) {
            operand = rewriter.create<TF::CastOp>(
                op.getLoc(), expected_type, operand,
                /*Truncate=*/rewriter.getBoolAttr(false));
          }
          casted_operands.push_back(operand);
        }
    
        auto call = rewriter.create<func::CallOp>(
            op->getLoc(), main_fn.getSymName(), main_fn.getResultTypes(),
            casted_operands);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 25 09:43:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/utils.cc

    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));
    }
    
    DenseIntElementsAttr GetI64ElementsAttr(ArrayAttr attr) {
      RankedTensorType 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)
  9. tensorflow/compiler/jit/xla_compile_util.cc

      // _Arg nodes, and let CompileGraph walk it. This could be optimized.
      std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
    
      // First create the actual node we care about computing.
      TF_ASSIGN_OR_RETURN(Node * main_node, graph->AddNode(node_def));
    
      // Create dummy _Arg nodes. Link these to `node` and also via a control
      // dependency edge to the _SOURCE node.
      for (int64_t i = 0, end = args.size(); i < end; ++i) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc

        Value input = op->getOperand(0);
        const TensorType new_input_tensor_type = GetTransposedTensorType(
            mlir::cast<TensorType>(input.getType()), kNchwToNhwcPermutation);
    
        auto input_transpose_op = rewriter.create<mlir::stablehlo::TransposeOp>(
            op.getLoc(), /*resultType0=*/new_input_tensor_type, /*operand=*/input,
            rewriter.getDenseI64ArrayAttr(kNchwToNhwcPermutation));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.2K bytes
    - Viewed (0)
Back to top