Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 107 for eraseOp (0.35 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/tests/remove_var_init_by_const.mlir

      // CHECK-NEXT: "tf.AssignVariableOp"(%[[VAR]], %[[IDENTITY]])
    }
    
    // -----
    
    // If something other than `tf.VarHandleOp` is being initialized, it is
    // not erased.
    
    // CHECK-LABEL: module
    module attributes {tf_saved_model.semantics} {
      "tf_saved_model.session_initializer"() {initializers = [@init_func_restore_op]} : () -> ()
      // CHECK: "tf_saved_model.session_initializer"()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfold_splat_constant_pass.cc

            op_builder->create<mhlo::BroadcastInDimOp>(
                const_op->getLoc(), splat_elements_attr.getType(), scalar,
                broadcast_dims);
        const_op->replaceAllUsesWith(broadcast_in_dim_op);
        const_op->erase();
      }
    };
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>> CreateUnfoldSplatConstantPass() {
      return std::make_unique<UnfoldSplatConstantPass>();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/fake_quant_utils.cc

                             op->getAttrs(), op->getSuccessors());
        Operation* inlined = builder.create(state);
    
        parent_op->replaceAllUsesWith(inlined);
        parent_op->erase();
      }
      return success();
    }
    
    // Three instances of the rule to cover the three different types of
    // TF::FakeQuant operators
    using PreparePerTensorFakeQuant = InsertTFLQuantOpsAfterTFFakeQuantOp<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 03 00:14:05 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/hoist_replicate_invariant_resource_writes.cc

        auto index = indexed_assign.index();
        assign_op->moveAfter(new_replicate_op);
        assign_op->setOperand(
            1, new_replicate_op->getResult(old_num_results + num_replicas * index));
      }
      replicate_op->erase();
    }
    
    // Looks for AssignVariable ops from the end of the tf_device.replicate op. It
    // returns all the last writes to replicate invariant resource variables
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_tf_while.cc

      CreateRegionWithCall(while_op.cond_function(), new_op.getCond(), loc);
      CreateRegionWithCall(while_op.body_function(), new_op.getBody(), loc);
    
      op->replaceAllUsesWith(new_op.getResults());
      op->erase();
    }
    
    void LegalizeWhilePass::RunOnFunction(func::FuncOp func) {
      // Convert all TF WhileOps inside the function body to TFL While ops.
      func.getBody().walk([](TF::WhileOp while_op) { RunOnWhile(while_op); });
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/xla_rewrite.cc

          ValueRange(resource_args), cluster_func_op.getFuncAttr());
    
      CopyDeviceAndUnderscoredAttributes(cluster_func_op, xla_launch_op);
      cluster_func_op.replaceAllUsesWith(xla_launch_op.getResults());
      cluster_func_op.erase();
    }
    
    void XlaRewritePass::runOnOperation() {
      ModuleOp module = getOperation();
      SymbolTable symtab(module);
      OpBuilder builder(&getContext());
      module.walk([&](tf_device::ClusterFuncOp cluster_func_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/device_index_selector.cc

        DenseElementsAttr attr =
            DenseElementsAttr::get(type, b.getI32IntegerAttr(index));
        auto constant = b.create<arith::ConstantOp>(op.getLoc(), type, attr);
        op.replaceAllUsesWith(constant.getOperation());
        op.erase();
      });
    }
    
    // Creates an instance of the TensorFlow DeviceIndex selector pass.
    std::unique_ptr<OperationPass<func::FuncOp>> CreateDeviceIndexSelectorPass() {
      return std::make_unique<DeviceIndexSelector>();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/freeze_saved_model_assets.cc

                init_op.getLoc(), init_op.getTableHandle(), const_op.getResult(),
                init_op.getKeyIndex(), init_op.getValueIndex(),
                init_op.getVocabSize(), init_op.getDelimiter());
            init_op.erase();
          }
        }
        func.eraseArguments(args_to_erase);
      }
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>> CreateFreezeAssetsPass(
        std::string saved_model_dir) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jan 30 01:12:09 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/materialize_mlir_passthrough_op.cc

        Operation &return_op = block.front();
        for (auto ret_mapping :
             llvm::zip(op->getResults(), return_op.getOperands())) {
          std::get<0>(ret_mapping).replaceAllUsesWith(std::get<1>(ret_mapping));
        }
        op->erase();
      });
    }
    
    }  // namespace
    
    namespace TF {
    std::unique_ptr<OperationPass<func::FuncOp>>
    CreateMaterializePassthroughOpPass() {
      return std::make_unique<MaterializePassthroughOpPass>();
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc

        TFL::FillOp fill = op_builder->create<TFL::FillOp>(
            const_op->getLoc(), splat_elements_attr.getType(), fill_shape,
            fill_value);
        const_op->replaceAllUsesWith(fill);
        const_op->erase();
      }
    };
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>> CreateUnfoldLargeSplatConstantPass() {
      return std::make_unique<UnfoldLargeSplatConstantPass>();
    }
    
    }  // namespace TFL
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top