Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 52 for replaceMap (0.24 sec)

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

      result_shape.push_back(rows);
      result_shape.push_back(cols);
    
      auto reshape_op = createReshapeOp(pack_op.getOutput(), result_shape,
                                        element_type, loc, rewriter);
      rewriter.replaceOp(op, reshape_op.getOutput());
      return success();
    }
    
    std::unique_ptr<OperationPass<func::FuncOp>> CreateUnrollBatchMatMulPassPass() {
      return std::make_unique<UnrollBatchMatMulPass>();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

        Block &block = op.GetBody();
        // Check if graph only has one fetch.
        if (&block.front() != &block.back()) return failure();
    
        // Map graph results to fetch operands.
        rewriter.replaceOp(op, op.GetFetch().getFetches());
    
        return success();
      }
    };
    
    // This pattern matches GraphOps with only one island, pulls out all inner ops
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

          }
          auto scast_op = rewriter.create<quantfork::StorageCastOp>(
              call_op.getLoc(), result_type, result);
          replace_map.insert(std::make_pair(result, scast_op));
        }
    
        for (auto replace_pair : replace_map) {
          Value result = replace_pair.first;
          quantfork::StorageCastOp scast_op = replace_pair.second;
          result.replaceAllUsesExcept(scast_op, scast_op);
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_device.cc

                                  new_op.getBodyRegion().end());
    
      int idx = 0;
      for (Value& result : new_results) {
        if (result == nullptr) result = new_op.getResult(idx++);
      }
      rewriter.replaceOp(op, new_results);
      return success();
    }
    }  // anonymous namespace
    
    void ClusterOp::getCanonicalizationPatterns(RewritePatternSet& results,
                                                MLIRContext* context) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

        Value fused_op = rewriter.create<FusedOpT>(fused_loc, result_type,
                                                   ValueRange(operands), attrs);
        auto op_to_replace = fuse_activation ? activation : bias_add;
        rewriter.replaceOp(op_to_replace, ValueRange({fused_op}));
        return success();
      }
    };
    
    const char kDeviceAttr[] = "device";
    const char kDeviceGpu[] = "GPU";
    
    std::optional<std::string> GetDevice(mlir::Operation *op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

            new_output_types.push_back(op.getResult().getType());
          } else {
            new_output_types.push_back(result.getType());
          }
        }
    
        // Remove this rescale op.
        rewriter.replaceOp(op, {pre_quantized});
    
        // Replace the output scale of the preceding op.
        rewriter.setInsertionPointAfter(def);
        OperationState new_state(def->getLoc(), def->getName().getStringRef(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

        llvm::SmallVector<Value> output_values;
        if (failed(GetKernelOutputs(op_context, tuple_result, output_values))) {
          return failure();
        }
    
      rewriter_.replaceOp(op_, output_values);
      return success();
    }
    
    absl::StatusOr<mhlo::TupleOp> Tf2XlaRewriter::CompileWithHloImporter(
        tensorflow::OpKernelContext& op_context) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

          for (auto index_result :
               llvm::zip(dynamic_indices, dynamic_shape_n.getResults())) {
            results[std::get<0>(index_result)] = std::get<1>(index_result);
          }
        }
    
        rewriter.replaceOp(op, results);
        return success();
      }
    };
    
    // Canonicalize ShapeNOp to ShapeOp if there is only one operand.
    class ShapeNToShape : public OpRewritePattern<ShapeNOp> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

          new_results.push_back(list_op.getOut());
        }
      }
    
      // Copy all the allowed attributes to the new op.
      if (failed(CopyNonSymbolRefAttrs(call_op, new_op))) return failure();
    
      rewriter.replaceOp(call_op, new_results);
      return success();
    }
    
    LogicalResult RewriteTFRCallOp::matchAndRewrite(
        CallOp call_op, PatternRewriter& rewriter) const {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

                                        ArrayRef<NamedAttribute>());
      Operation* new_unary_op = rewriter.create(new_unary_op_state);
      CopyDeviceAndUnderscoredAttributes(op, new_unary_op);
    
      rewriter.replaceOp(op, new_unary_op->getResults());
    
      return success();
    }
    
    // Hoist coefficient-wise binary operation out of the Concat op:
    //
    //   %0 = tf.Mul(%lhs_0, %rhs_0)
    //   %1 = tf.Mul(%lhs_1, %rhs_1)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
Back to top