Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 128 for get_shape (0.4 sec)

  1. tensorflow/compiler/jit/xla_tpu_device.cc

      TF_RETURN_IF_ERROR(
          tensorflow::TensorShapeToXLAShape(type, shape, &xla_shape));
      ApiConverter::StackHelper<XLA_Shape> se_shape(xla_shape);
      ApiConverter::StackHelper<XLA_Shape> tpu_shape;
      StatusHelper status;
      stream_executor::tpu::ExecutorApiFn()->XlaShapeToTpuShapeRepresentationFn(
          &se_shape.value, type, use_fast_memory, &tpu_shape.value,
          status.c_status);
      if (!status.status().ok()) {
        return status.status();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc

        }
      }
      // Verify axisStats (optional) attribute.
      if (getAxisStats()) {
        if (!getAxis()) return emitOpError("axis must be specified for axisStats");
    
        auto shape = tensorArg.getShape();
        auto argSliceSize =
            std::accumulate(std::next(shape.begin(), *getAxis()), shape.end(), 1,
                            std::multiplies<int64_t>());
    
        auto axisStatsType = getAxisStats()->getShapedType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc

          auto inputType = mlir::dyn_cast<RankedTensorType>(arg.getType());
          // Only rank 1 tensor is supported for now.
          if (!inputType || inputType.getRank() != 1) continue;
          auto shape = llvm::to_vector<4>(inputType.getShape());
          llvm::SmallVector<int64_t, 4> bounds(shape.begin(), shape.end());
          // Mark the dim as dynamic dim.
          shape[0] = ShapedType::kDynamic;
          auto extensions =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc

        }
      }
      // Verify axisStats (optional) attribute.
      if (getAxisStats()) {
        if (!getAxis()) return emitOpError("axis must be specified for axisStats");
    
        auto shape = tensorArg.getShape();
        auto argSliceSize =
            std::accumulate(std::next(shape.begin(), *getAxis()), shape.end(), 1,
                            std::multiplies<int64_t>());
    
        auto axisStatsType = getAxisStats()->getShapedType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc

      func.eraseBody();
      func.addEntryBlock();
      ImplicitLocOpBuilder builder(func.getLoc(), func.getBody());
      llvm::SmallVector<int32_t> result_shape_i32;
      auto result_shape = result_ty.getShape();
      for (auto element : result_shape) {
        result_shape_i32.push_back(static_cast<int32_t>(element));
      }
      auto result_shape_attr = builder.getI32TensorAttr(result_shape_i32);
      Value result_shape_tensor =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/utils/constant_utils.cc

    absl::StatusOr<arith::ConstantOp> CreateConstOpWithVectorValue(
        PatternRewriter* rewriter, Location loc, ShapedType shaped_type,
        int value) {
      ShapedType dense_type = RankedTensorType::get(shaped_type.getShape(),
                                                    shaped_type.getElementType());
      auto attr = CreateTypedAttr(dense_type, value);
    
      return rewriter->create<arith::ConstantOp>(loc, dense_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfrt/saved_model/saved_model.cc

      TF_RETURN_IF_ERROR(
          ConvertScalarTypeToDataType(type.getElementType(), &dtype));
    
      if (!type.hasRank())
        return std::make_pair(dtype, tensorflow::PartialTensorShape());
    
      auto shape = type.getShape();
      llvm::SmallVector<int64_t, 4> dims;
      dims.assign(shape.begin(), shape.end());
      return std::make_pair(dtype, tensorflow::PartialTensorShape(dims));
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc

      // equal.
      TensorType GetTransposedTensorType(
          const TensorType type, const ArrayRef<int64_t> permutation) const {
        const SmallVector<int64_t> after_shape =
            Permute<int64_t>(type.getShape(), permutation);
        return type.cloneWith(after_shape, type.getElementType());
      }
    };
    
    }  // namespace
    
    void NchwConvolutionToNhwcPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

        if (!input_type) {
          return failure();
        }
        const ArrayRef<int64_t> input_shape = input_type.getShape();
    
        const int input_size = input_shape.size();
    
        RankedTensorType begin_type = mlir::cast<RankedTensorType>(begin.getType());
        const ArrayRef<int64_t> begin_shape = begin_type.getShape();
        const int begin_dim = begin_shape.size();
    
        if (begin_dim != 1) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  10. tensorflow/c/tf_tensor_internal.h

      size_t ByteSize() const override;
      void* Data() const override;
      bool IsAligned() const override;
      bool CanMove() const override;
      std::string SummarizeValue() const override;
    
      void SetShape(const int64_t* dims, int num_dims);
      Status ToTensor(tensorflow::Tensor* dst) const;
      Status BitcastFrom(const TensorInterface& from, DataType type,
                         const int64_t* new_dims, int num_new_dims);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 24 20:38:55 UTC 2023
    - 4.6K bytes
    - Viewed (0)
Back to top