Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 380 for getLoc (0.18 sec)

  1. tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc

     public:
      LogicalResult matchAndRewrite(ConstantTensorOp cst_tensor_op,
                                    PatternRewriter &rewriter) const override {
        Location loc = cst_tensor_op.getLoc();
        Type out_type = cst_tensor_op.getType();
        Operation *new_cst = nullptr;
    
        ArrayAttr array;
        if (matchPattern(cst_tensor_op.getArg(), m_Constant(&array))) {
          llvm::DenseSet<Type> all_types;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/visitor.cc

        ModuleOp module, llvm::ArrayRef<llvm::StringRef> function_names) {
      SymbolTableCollection symbol_table;
      OpBuilder builder(module.getContext());
    
      OwningOpRef<ModuleOp> pruned =
          builder.create<ModuleOp>(module->getLoc());
      (*pruned)->setAttrs(module->getAttrs());
      builder.setInsertionPointToEnd(pruned->getBody());
    
      llvm::SmallDenseSet<func::FuncOp> added;
      for (const llvm::StringRef function_name : function_names) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 03:46:51 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tf_functional_to_executor.cc

      if (!llvm::hasSingleElement(func)) {
        LLVM_DEBUG(llvm::dbgs() << "Expect single block function, skip conversion "
                                   "to tf_executor dialect\n");
        return;
      }
      auto loc = func.getLoc();
      mlir::Block& body = func.front();
      // Find region of interest and ReturnOp.
      auto copy_range = body.without_terminator();
      if (copy_range.begin() != copy_range.end() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

              contraction,
              "cannot fuse with the subsequent op as it's not supported by the "
              "target device.");
        }
    
        SmallVector<Location, 3> locations{contraction.getLoc(), bias_add.getLoc()};
        SmallVector<Attribute, 2> fused_ops{StringAttr::get(
            context, bias_add.getOperation()->getName().stripDialect())};
    
        // BiasAdd may or may not feed into an activation function.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/session_utils.cc

      // In some cases the shared_name attribute doesn't have the same
      // tensor name in the model, so we first try to use the location
      // then fallback to shared_name attribute.
      if (auto loc = mlir::dyn_cast<NameLoc>(var_handle_op->getLoc()))
        return loc.getName().str();
      return var_handle_op.getSharedName().str();
    }
    
    std::vector<std::string> GetVariableNames(
        llvm::ArrayRef<TF::VarHandleOp> var_handle_ops) {
      std::vector<std::string> names;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.cc

        ++dim;
      }
    
      auto permutation_and_shape = GetPermutationAndTransposedShape(
          permutation_array, updates_type, rewriter);
    
      auto transposed_updates = rewriter.create<mhlo::TransposeOp>(
          scatter_op->getLoc(), permutation_and_shape.shape, updates,
          permutation_and_shape.permutation);
    
      updates = transposed_updates;
      updates_type = permutation_and_shape.shape;
      return success();
    }
    
    }  // end namespace odml
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 12 02:29:42 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/name_anonymous_iterators.cc

    };
    
    template <typename OP>
    int replace(OP op, int count) {
      OpBuilder builder(op);
      std::string name = absl::StrFormat("_iterator%d", count++);
    
      auto new_op = builder.create<TF::IteratorOp>(
          op->getLoc(), op->getResultTypes()[0], name, /*container=*/"",
          op.getOutputTypes(), op.getOutputShapes());
      op->getResults()[0].replaceAllUsesWith(new_op->getResults()[0]);
      if (op->use_empty()) op->erase();
      return count;
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc

        IntegerAttr group_key = rewriter.getI32IntegerAttr(0);
    
        auto const_group_size = rewriter.create<TF::ConstOp>(
            assign_group->getLoc(), assign_group.getResult(0).getType(),
            group_size);
        auto const_group_key = rewriter.create<TF::ConstOp>(
            assign_group->getLoc(), assign_group.getResult(1).getType(), group_key);
        rewriter.replaceAllUsesWith(assign_group.getResult(0), const_group_size);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc

      }
    
      auto lhs_new_concat = rewriter.create<mhlo::ConcatenateOp>(
          concat->getLoc(), concat.getType().clone(lhs_new_concat_shape),
          all_dot_lhs, rewriter.getI64IntegerAttr(lhs_batch_dim));
      auto rhs_new_concat = rewriter.create<mhlo::ConcatenateOp>(
          concat->getLoc(), concat.getType().clone(rhs_new_concat_shape),
          all_dot_rhs, rewriter.getI64IntegerAttr(rhs_batch_dim));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op_test.cc

      context.loadDialect<TF::TensorFlowDialect, quant::QuantizationDialect,
                          func::FuncDialect>();
      EmptyPatternRewriter pattern_rewriter(builder);
      Value value = CreateConstValue<float>(builder, module->getLoc(), {1024, 2},
                                            SmallVector<float>(2048, 0));
    
      QuantizationComponentSpec quant_spec;
      quant_spec.set_quantization_component(
          QuantizationComponentSpec::COMPONENT_WEIGHT);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 3K bytes
    - Viewed (0)
Back to top