Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for replaceAllUsesExcept (0.31 sec)

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

      assert(mlir::isa<mlir::tf_device::ReturnOp>(return_op));
    
      Value old_val, new_val;
      for (auto it : llvm::zip(cluster_op.getResults(), return_op.getOperands())) {
        std::tie(old_val, new_val) = it;
        old_val.replaceAllUsesExcept(new_val, &return_op);
      }
    
      cluster_op.erase();
    }
    
    void XlaInlineDeviceOpsPass::runOnOperation() {
      ModuleOp module = getOperation();
    
      llvm::SmallVector<tf_device::ClusterOp, 4> ops;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 04 00:59:46 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_xla_call_module_op_to_bfloat16.cc

            op_result.setType(ToBfloat16Type(original_type));
            const Value cast =
                builder.create<TF::CastOp>(op->getLoc(), original_type, op_result);
            op_result.replaceAllUsesExcept(cast, cast.getDefiningOp());
          }
        }
        return WalkResult::advance();
      });
    
      if (result.wasInterrupted()) return signalPassFailure();
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 08:32:43 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

        // Wire input/output nodes.
        new_dequantize_op->setOperand(0, user_op->getResult(0));
        new_dequantize_op->getResult(0).setType(user_op->getResult(0).getType());
        user_op->getResult(0).replaceAllUsesExcept(new_dequantize_op->getResult(0),
                                                   new_dequantize_op);
        user_op->getResult(0).setType(new_user_op_type);
      }
    
      LogicalResult matchAndRewrite(TF::PartitionedCallOp op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_to_vhlo.cc

      auto type = result.getType();
      result.setType(converter.convertType(result.getType()));
      auto new_value = converter.materializeArgumentConversion(
          rewriter, result.getLoc(), type, {result});
      rewriter.replaceAllUsesExcept(result, new_value, new_value.getDefiningOp());
    }
    
    // Wrap operands in an an unrealized cast to create a cast to buffer any type
    // changes to the operand, and apply type converter to operands:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 19:48:51 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

          Operation *aggregator_op = rewriter.create<TF::CustomAggregatorOp>(
              op->getLoc(), output_types, value, attributes);
    
          Value aggregator_op_result = aggregator_op->getOpResult(0);
          value.replaceAllUsesExcept(aggregator_op_result, aggregator_op);
        }
    
        return success();
      }
    
     private:
      CalibrationOptions calib_opts_;
    };
    
    void InsertCustomAggregationOpsPass::runOnOperation() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

            // 'sharding' attribute.
            auto updated_arg = builder.create<TF::XlaShardingOp>(
                func.getLoc(), arg.getType(), arg, sharding, sharding);
            func.getArgument(i).replaceAllUsesExcept(
                updated_arg, llvm::SmallPtrSet<Operation*, 1>({updated_arg}));
          }
    
          func.removeArgAttr(i, builder.getStringAttr(kShardingAttr));
        }
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc

      for (auto [original_output_value, xla_call_module_op_result_value] :
           llvm::zip_equal(outputs, xla_call_module_op->getResults())) {
        original_output_value.replaceAllUsesExcept(xla_call_module_op_result_value,
                                                   /*exceptedUser=*/nullptr);
      }
    }
    
    // Replaces the StableHLO ops with a separate XlaCallModuleOp, then wires it
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

      Operation* terminator_op =
          old_op->getParentOfType<func::FuncOp>().front().getTerminator();
      llvm::SmallPtrSet<mlir::Operation*, 1> exceptions = {terminator_op};
      old_val.replaceAllUsesExcept(new_val, exceptions);
    }
    
    struct TensorArrayStats {
      // Whether a write op should accumulate with the old value. Set to true if
      // this is a gradient.
      bool accumulate_on_write;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

        auto dq = rewriter.create<TFL::DequantizeOp>(
            op->getLoc(), /*output=*/dequantized_rhs_type,
            /*input=*/rhs);
        rewriter.replaceAllUsesExcept(rhs, dq.getOutput(), dq);
      }
    };
    
    // Splits hybrid quantized `stablehlo.convolution` into `tfl.dequantize` and
    // float `stablehlo.convolution` op. Weight tensor is transposed to match the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

        }
    
        for (auto replace_pair : replace_map) {
          Value result = replace_pair.first;
          quantfork::StorageCastOp scast_op = replace_pair.second;
          result.replaceAllUsesExcept(scast_op, scast_op);
        }
    
        // Make a copy of the quantized function.
        auto module = call_op->getParentOfType<ModuleOp>();
        SymbolTable symbol_table(module);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
Back to top