Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 79 of 79 for getElementDtype (0.2 sec)

  1. tensorflow/compiler/mlir/tfr/passes/decompose.cc

            }
            if (!attribute && attr_name.getValue() == "out_type") {
              auto type = op->getResult(0).getType();
              if (mlir::isa<TensorType>(type)) {
                type = mlir::cast<TensorType>(type).getElementType();
              }
              attribute = TypeAttr::get(type);
            }
            Value attr_cst;
            // Wrap these special attributes as a special TFR constant, so the SSA
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/ir/tfr_ops.td

        // input is a MLIR built-in tensor type.
        Attribute getInputElementType() {
          if (auto ty = getArg().getType().dyn_cast<TensorType>()) {
            return TypeAttr::get(ty.getElementType());
          }
          return {};
        }
      }];
    
      let hasCanonicalizer = 1;
    }
    
    def TFR_GetShapeOp : TFR_Op<"get_shape", [Pure]> {
      let description = [{
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 10:54:29 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

      ASSERT_THAT(func_op, NotNull());
    
      auto uniform_quantize_op =
          *func_op.getOps<::mlir::stablehlo::UniformQuantizeOp>().begin();
      Value result = uniform_quantize_op.getResult();
      EXPECT_THAT(GetElementType(result), NotNull());
    }
    
    }  // namespace
    }  // namespace quant
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/internal/passes/mark_ops_for_outside_compilation.cc

      if (!sub_type) return false;
    
      bool has_string = llvm::any_of(sub_type.GetSubtypes(), [](TensorType type) {
        return mlir::isa<mlir::TF::StringType>(type.getElementType());
      });
      return has_string;
    }
    
    bool HasStringOperand(Operation& op) {
      for (auto operand : op.getOperands()) {
        auto operand_type = getElementTypeOrSelf(operand);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

          // For type attributes, we only propagate the element type.
          mlir::Type elt_type = attr.getValue();
          if (auto shaped_type = mlir::dyn_cast<mlir::ShapedType>(elt_type)) {
            elt_type = shaped_type.getElementType();
          }
          TF_RETURN_IF_ERROR(
              ConvertAttribute(elt_type, remove_ref_type, &attr_val));
          list->add_type(attr_val.type());
        } else if (auto attr = mlir::dyn_cast<mlir::TF::ShapeAttr>(a)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/stack_ops_decomposition.cc

      }
      OpBuilder builder(stack);
      Value buffer;
      if (failed(cutil::CreateInitBufferValue(
              elem_type->getShape(), stack.getMaxSize(), stack,
              elem_type->getElementType(), builder, &buffer))) {
        return failure();
      }
      auto size_var_type = GetSizeVarType(builder);
      auto var_type = RankedTensorType::get(
          {}, TF::ResourceType::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_merge_variables_with_execute.cc

      for (auto it : llvm::enumerate(var_access_info.new_operand_values)) {
        Type type = it.value().getType();
        if (type.isa<TensorType>() &&
            type.cast<TensorType>().getElementType().isa<TF::ResourceType>()) {
          if (!llvm::is_contained(device_var_reads_indices, it.index()) &&
              !llvm::is_contained(device_var_updates_indices, it.index())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 17:52:11 UTC 2024
    - 27K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_sequencing.cc

      return types;
    }
    
    bool IsResourceType(Type val_type) {
      if (auto tensor_type = mlir::dyn_cast<mlir::TensorType>(val_type)) {
        if (mlir::isa<TF::ResourceType>(tensor_type.getElementType())) {
          return true;
        }
      }
      return false;
    }
    
    bool IsTPUOp(mlir::Operation* op) {
      return op->hasAttr(TF::kReplicationInfoAttr);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

          if (dims[dim] == mlir::ShapedType::kDynamic) {
            dims[dim] = encoding.getBounds()[dim];
          }
        }
      }
      return GetTypeFromTFTensorShape(dims, ranked_ty.getElementType());
    }
    
    // Calculates computation output shape and build OutputDescription for each
    // output based on static shapes in MLIR module. If an output is a resource
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
Back to top