Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 107 for eraseOp (0.15 sec)

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

    // results.
    void RemoveIdentityFromRegion(Region& region) {
      region.walk([](Operation* op) {
        if (isa<TF::IdentityOp, TF::IdentityNOp>(op)) {
          op->replaceAllUsesWith(op->getOperands());
          op->erase();
        }
      });
    }
    
    void TPUIdentityPruning::runOnOperation() {
      SmallVector<tf_device::ClusterOp, 4> clusters;
      getOperation().walk(
          [&](tf_device::ClusterOp cluster) { clusters.push_back(cluster); });
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/raise_custom_ops.cc

        }
        custom_op->setAttrs(inner_op->getAttrs());
        builder.create<YieldOp>(loc, inner_op->getResults());
        custom_op.getBody().takeBody(region);
    
        op->replaceAllUsesWith(custom_op);
        op->erase();
      }
    }
    }  // namespace
    
    std::unique_ptr<OperationPass<func::FuncOp>> CreateRaiseCustomOpsPass() {
      return std::make_unique<RaiseCustomOpsPass>();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_duplicate_resource_ops.cc

        op.replaceAllUsesWith(existing_resource->getParentOp()->getResults());
        ops_to_remove.push_back(&op);
      }
    
      // Remove op after the loop to avoid crash.
      for (Operation* op : ops_to_remove) {
        op->erase();
      }
    }
    
    static PassRegistration<MergeDuplicateResourceOpsPass> pass{};
    
    }  // namespace
    
    std::unique_ptr<OperationPass<func::FuncOp>>
    CreateMergeDuplicateResourceOpsPass() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 04:26:16 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/cc/weight_only_ptq.cc

                              *ctx, *module));
    
      // Remove the `tpu` tag for exporting because the output quantized model is
      // essentially a CPU model.
      tags.erase("tpu");
    
      py_function_library.SaveExportedModel(
          dst_saved_model_path, post_calibrated_exported_model,
          src_saved_model_path, tags, signature_def_map);
    
      return absl::OkStatus();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 02:59:01 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util_test.cc

      // Wrap the cluster op into a Launch op
      auto launch_op = tensorflow::WrapOpInLaunch(&builder, loc, cluster, device);
    
      EXPECT_TRUE(llvm::isa<mlir::tf_device::LaunchOp>(launch_op));
      launch_op->erase();
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

      auto new_op = builder->create<OpT>(op->getLoc(), op->getResultTypes(),
                                         operands, attr.getAttrs());
      op->replaceAllUsesWith(new_op.getOperation()->getResults());
      op->erase();
      return new_op;
    }
    
    // Returns success if the function has at most one op of the template type and
    // assigns it to `result`, if present. If there are multiple such ops, returns
    // failure.
    template <typename OpT>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/sink_constant.cc

              LLVM_DEBUG(llvm::dbgs() << "Re-use sunk constant " << use->get()
                                      << "\n     in " << use->get() << "\n");
              if (constant.use_empty()) const_op.erase();
              return;
            }
            if (constant.hasOneUse()) {
              LLVM_DEBUG(llvm::dbgs() << "Moved constant " << constant << "\n");
              const_op.getOperation()->moveBefore(&body.begin()->front());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/topological_sort.cc

        if (!best) {
          assert(ready.empty());
          return result;  // happens for unused results for ops in the todo list
        }
    
        // Consider this operation emitted, and make its results available.
        ready.erase(std::find(ready.begin(), ready.end(), best));
        previous_op = best;
        for (Value result : best->getResults()) {
          todo.push(result);
        }
        for (Operation* successor : ctrlSuccessors(best)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 08 17:01:11 UTC 2022
    - 5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/unwrap_xla_call_module_op.cc

        for (auto [result, new_result] :
             llvm::zip_equal(op.getResults(), new_op.getResults())) {
          new_op_mapper.map(result, new_result);
        }
      }
    
      call_op.erase();
    }
    
    void UnwrapXlaCallModuleOpPass::runOnOperation() {
      ModuleOp module_op = getOperation();
      SymbolTable symbol_table(module_op);
    
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/cc/static_range_ptq.cc

                              *ctx, *module));
    
      // Remove the `tpu` tag for exporting because the output quantized model is
      // essentially a CPU model.
      tags.erase("tpu");
    
      py_function_library.SaveExportedModel(
          dst_saved_model_path, post_calibrated_exported_model,
          src_saved_model_path, tags, signature_def_map);
    
      return absl::OkStatus();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 12:49:45 UTC 2024
    - 6K bytes
    - Viewed (0)
Back to top