Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 278 for getOperation (0.42 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/hoist_loop_invariant.cc

          },
          [&](Operation *op, Region *) { loopLike.moveOutOfLoop(op); });
    }
    
    void HoistLoopInvariantPass::runOnOperation() {
      func::FuncOp func = getOperation();
    
      // Skip the pass if the function inputs contain any resource.
      for (const auto &type : func.getArgumentTypes()) {
        if (mlir::isa<ResourceType>(getElementTypeOrSelf(type))) return;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/internal/passes/hoist_broadcast_read.cc

        if (has_conflicting_write) continue;
        read->moveBefore(replicate);
      }
    }
    
    // Hoist `ReadVariableOp`s above the `tf_device.replicate`s.
    void HoistBroadcastRead::runOnOperation() {
      FuncOp func = getOperation();
    
      auto result = func.walk([&](ReplicateOp replicate) {
        llvm::SmallVector<ReadVariableOp, 4> reads;
        if (failed(GetReads(func, replicate, reads)))
          return WalkResult::interrupt();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tf_graph_optimization_pass.cc

      // operation list from module_out to module_in.
      auto& module_in_ops = module_in.getBody()->getOperations();
      module_in_ops.clear();
      module_in_ops.splice(module_in_ops.end(),
                           module_out->getBody()->getOperations());
    }
    
    // Returns a vector of passes from their names. If a pass is not found, then the
    // corresponding return entry is null.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 22:19:26 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/tf_stablehlo_pass.cc

          *this, "skip-partitioned-calls",
          ::llvm::cl::desc(
              "Skip tf.StatefulPartitionedCall and tf.PartitionedCall")};
    };
    
    void TFToMhloPass::runOnOperation() {
      auto func = getOperation();
      MLIRContext *context = func->getContext();
    
      RewritePatternSet patterns(context);
      mhlo::PopulateLegalizeTfPatterns(context, &patterns);
      TF::PopulateTFLoweringBeforeHLOPatterns(context, &patterns);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/dense_to_sparse.cc

    };
    
    void DenseToSparsePass::runOnOperation() {
      func::FuncOp func = getOperation();
      OpBuilder builder(func);
    
      func.walk([&](SparseOpInterface sparse_op) {
        const auto& sparse_operands = sparse_op.GetSparseOperands();
        std::vector<std::vector<int>> supported_block_size;
        for (int operand : sparse_operands) {
          auto* op = sparse_op.getOperation();
          auto value = op->getOperand(operand);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

        StringRef attr_name = attr.getName().getValue();
        if (attr_name.starts_with("tf_saved_model.")) {
          func->removeAttr(attr_name);
        }
      }
    
      auto iface = cast<FunctionOpInterface>(func.getOperation());
      for (int i = 0; i < func.getNumArguments(); ++i) {
        for (auto& attr : iface.getArgAttrs(i)) {
          const StringAttr& attr_name = attr.getName();
          if (attr_name.getValue().starts_with("tf_saved_model.")) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/optimize_global_tensors.cc

            args_to_erase.set(i);
          }
        }
        func.eraseArguments(args_to_erase);
      }
    }
    
    void OptimizeGlobalTensorsPass::runOnOperation() {
      auto module = getOperation();
      if (!tf_saved_model::HasTfSavedModelSemantics(module)) {
        return;
      }
    
      EraseUnusedBoundInputs(module);
    
      TF::ResourceAnalyzer resource_analyzer(module);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc

        // the results of the other tf_device.remote_run operations using the
        // `mapping` as appropriate.
        Operation *cloned_remote_run_op =
            builder.clone(*remote_run_op.getOperation(), mapping);
        remote_run_op.erase();
    
        // Replaces usages of the results of the original operations with the
        // results of the tf_device.remote_run operations.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

          InsertCalibrationStatisticsSaverPassBase;
    
     private:
      void runOnOperation() override;
    };
    
    void InsertCalibrationStatisticsSaverPass::runOnOperation() {
      ModuleOp module_op = getOperation();
      MLIRContext& ctx = getContext();
    
      std::unordered_set<std::string> aggregator_ops_to_ignore(
          aggregator_ops_to_ignore_.begin(), aggregator_ops_to_ignore_.end());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/debugging/mlir_dump_test.cc

      ParentPass() = default;
    
      llvm::StringRef getArgument() const final { return "parent-pass"; }
    
      void runOnOperation() override {
        mlir::MLIRContext* ctx = &getContext();
        mlir::ModuleOp module_op = getOperation();
        mlir::PassManager pm(ctx);
    
        pm.addPass(CreateNoOpPass());
    
        EnableIrPrinting(pm, "dump2");
    
        if (failed(pm.run(module_op))) {
          signalPassFailure();
        }
      }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 14 03:17:14 UTC 2024
    - 6.4K bytes
    - Viewed (0)
Back to top