Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 127 for getLoc (0.38 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h

        // and its users.
        auto quantize = rewriter.create<quantfork::QuantizeCastOp>(
            tf_op.getLoc(), qtype.getValue(), input);
        auto dequantize = rewriter.create<quantfork::DequantizeCastOp>(
            tf_op.getLoc(), res_type, quantize.getResult());
        tf_op.getOutputs().replaceAllUsesWith(dequantize);
    
        return success();
      }
    
      bool use_fake_quant_num_bits_;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/transforms/utils.h

      Block* block = builder->createBlock(body);
    
      // Block arguments are scalars of the given element type.
      Type type = RankedTensorType::get(/*shape=*/{}, element_type);
      Location loc = body->getLoc();
      block->addArguments({type, type}, SmallVector<Location, 2>(2, loc));
    
      auto reducer =
          builder->create<Op>(loc, block->getArgument(0), block->getArgument(1));
      builder->create<ReturnOp>(loc, reducer.getResult());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/fold_constant_transpose.cc

            transposer.TransposeValues(original_values);
    
        // Create a new constant op with the transposed values.
        const Location combined_loc =
            rewriter.getFusedLoc({const_op.getLoc(), op.getLoc()});
        auto new_value_type =
            RankedTensorType::getChecked(combined_loc, transposer.GetTargetShape(),
                                         /*elementType=*/rewriter.getF32Type());
        auto new_value_attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/custom_call.cc

    LogicalResult ConvertCustomCallOp::matchAndRewrite(
        mhlo::CustomCallOp mhlo_custom_call, OpAdaptor adaptor,
        ConversionPatternRewriter& rewriter) const {
      auto tfl_custom = rewriter.create<TFL::CustomOp>(
          mhlo_custom_call.getLoc(), mhlo_custom_call.getResultTypes(),
          mhlo_custom_call.getInputs());
      tfl_custom.setCustomCodeAttr(
          rewriter.getStringAttr(mhlo_custom_call.getCallTargetName()));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/common/outline_operations.cc

      for (Value result : subgraph.FuncOutputs()) {
        Value cloned_output = values_in_scope.lookup(result);
        return_operands.push_back(cloned_output);
      }
      function_builder.create<mlir::func::ReturnOp>(new_func.getLoc(),
                                                    return_operands);
      ops_added.func_op = new_func;
      module.push_back(new_func);
      return new_func;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_quantized_functions.cc

      std::unique_ptr<llvm::MemoryBuffer> mem_buffer;
      llvm::StringRef quantized_function_library =
          GetFunctionLibrary(quantization_method_, op_set_);
    
      if (quantized_function_library.empty()) {
        emitError(module.getLoc())
            << "Failed to get function library for the opset.";
        signalPassFailure();
        return;
      }
    
      mem_buffer =
          llvm::MemoryBuffer::getMemBuffer(quantized_function_library,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tf_functional_to_executor.cc

      if (!llvm::hasSingleElement(func)) {
        LLVM_DEBUG(llvm::dbgs() << "Expect single block function, skip conversion "
                                   "to tf_executor dialect\n");
        return;
      }
      auto loc = func.getLoc();
      mlir::Block& body = func.front();
      // Find region of interest and ReturnOp.
      auto copy_range = body.without_terminator();
      if (copy_range.begin() != copy_range.end() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/session_utils.cc

      // In some cases the shared_name attribute doesn't have the same
      // tensor name in the model, so we first try to use the location
      // then fallback to shared_name attribute.
      if (auto loc = mlir::dyn_cast<NameLoc>(var_handle_op->getLoc()))
        return loc.getName().str();
      return var_handle_op.getSharedName().str();
    }
    
    std::vector<std::string> GetVariableNames(
        llvm::ArrayRef<TF::VarHandleOp> var_handle_ops) {
      std::vector<std::string> names;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.cc

        ++dim;
      }
    
      auto permutation_and_shape = GetPermutationAndTransposedShape(
          permutation_array, updates_type, rewriter);
    
      auto transposed_updates = rewriter.create<mhlo::TransposeOp>(
          scatter_op->getLoc(), permutation_and_shape.shape, updates,
          permutation_and_shape.permutation);
    
      updates = transposed_updates;
      updates_type = permutation_and_shape.shape;
      return success();
    }
    
    }  // end namespace odml
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 12 02:29:42 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op_test.cc

      context.loadDialect<TF::TensorFlowDialect, quant::QuantizationDialect,
                          func::FuncDialect>();
      EmptyPatternRewriter pattern_rewriter(builder);
      Value value = CreateConstValue<float>(builder, module->getLoc(), {1024, 2},
                                            SmallVector<float>(2048, 0));
    
      QuantizationComponentSpec quant_spec;
      quant_spec.set_quantization_component(
          QuantizationComponentSpec::COMPONENT_WEIGHT);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 3K bytes
    - Viewed (0)
Back to top