Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 363 for getLoc (0.13 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

          }
        }
      };
    
      for (int i = 0, e = func.getNumArguments(); i != e; ++i) {
        BlockArgument arg = func.getArgument(i);
        auto* arg_block = arg.getOwner();
        add_quantize_op(arg.getLoc(), arg.getType(), arg_block,
                        std::next(arg_block->begin(), i), arg, i);
      }
    
      return false;
    }
    
    bool PrepareQuantizePass::RemoveRedundantStats(func::FuncOp func) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_custom_call_to_composite.cc

        auto decomposition = mlir::cast<FlatSymbolRefAttr>(calledComputations[0]);
    
        auto composite = rewriter.create<mlir::stablehlo::CompositeOp>(
            op.getLoc(), op.getResultTypes(), op.getOperands(), name.str(), attrs,
            decomposition.getValue());
        rewriter.replaceOp(op, composite.getResults());
        return success();
      }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc

          if (operand.getType() != expected_type) {
            operand = rewriter.create<TF::CastOp>(
                op.getLoc(), expected_type, operand,
                /*Truncate=*/rewriter.getBoolAttr(false));
          }
          casted_operands.push_back(operand);
        }
    
        auto call = rewriter.create<func::CallOp>(
            op->getLoc(), main_fn.getSymName(), main_fn.getResultTypes(),
            casted_operands);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 25 09:43:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

        rewriter.setInsertionPointAfter(weight_op);
        auto new_shape_const = rewriter.create<arith::ConstantOp>(
            weight_op->getLoc(), shape_spec_type, new_shape_const_attr);
        auto reshape_op = rewriter.create<TF::ReshapeOp>(
            weight_op->getLoc(), new_shape, weight_op->getResult(0),
            new_shape_const);
        op->setOperand(weight_operand_idx, reshape_op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/device_index_selector.cc

          if (!isa<TF::CaseOp>(use)) return;
        }
        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.
    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/ir/tf_executor.cc

        // The "wraps" syntax only encodes a single location.
        // In order to correctly round-trip, we can only use this syntax when all
        // the locations are identical.
        if (wrapped_op.getLoc() == getLoc() && yield_op.getLoc() == getLoc()) {
          p << " wraps ";
          p.printGenericOp(&wrapped_op);
          return;
        }
      }
      p << ' ';
      p.printRegion(getOperation()->getRegion(0));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc

        if (!input_op) {
          return failure();
        }
    
        Builder builder(op.getContext());
        auto new_gather_op = rewriter.create<TFL::GatherOp>(
            op.getLoc(),
            /*result=*/
            mlir::cast<TensorType>(op.getResult().getType())
                .clone(builder.getI4Type()),
            /*operand=*/op.getOperands(), op->getAttrs());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/hoist_replicate_invariant_resource_writes.cc

      }
    
      OpBuilder builder(replicate_op);
      // Clone this old replicate op but with new result types.
      auto new_replicate_op = builder.create<tf_device::ReplicateOp>(
          replicate_op->getLoc(), new_result_types, replicate_op->getOperands(),
          replicate_op->getAttrs());
    
      // Move region to the new op.
      new_replicate_op.getRegion().takeBody(replicate_op.getRegion());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/raise_custom_ops.cc

            (target_op_names.empty() && !op->isRegistered())) {
          custom_ops.push_back(op);
        }
      });
    
      for (auto *op : custom_ops) {
        builder.setInsertionPoint(op);
        Location loc = op->getLoc();
        auto custom_op = builder.create<CustomTfOp>(loc, op->getResultTypes(),
                                                    op->getOperands());
        Region region;
        Block *new_block = new Block;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold.cc

        return failure();
      }
    
      results.clear();
      builder.setInsertionPointAfter(op);
      for (const auto& result_value : result_values) {
        results.push_back(builder.create<TF::ConstOp>(op->getLoc(), result_value));
      }
      return success();
    }
    
    bool IsOperationFoldable(Operation* op) {
      if (isa<TF::ConstOp>(op)) return true;
    
      if (op->getDialect()->getNamespace() != "tf" || !TF::CanBeFolded(op)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top