Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 129 for SmallVector (0.29 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.cc

      } else {
        // Convert I64 const array to I32.
        llvm::SmallVector<int32_t> const_i32_vec;
        for (auto element : const_value) {
          const_i32_vec.push_back(static_cast<int32_t>(element));
        }
        const_value_raw = rewriter.getI32TensorAttr(const_i32_vec);
      }
      Value result_const = builder.create<TF::ConstOp>(const_value_raw);
      return result_const;
    }
    
    llvm::SmallVector<int64_t> GetInversePermutationArray(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

    void AssignDevicesToReplicate(
        tf_device::ReplicateOp replicate,
        llvm::ArrayRef<llvm::SmallVector<tensorflow::TPUDeviceAndHost, 8>>
            tpu_devices,
        OpBuilder* builder) {
      if (!replicate) return;
    
      const int num_replicas = tpu_devices.size();
      const int num_cores_per_replica = tpu_devices.front().size();
    
      llvm::SmallVector<NamedAttribute, 8> device_attrs;
      for (int core = 0; core < num_cores_per_replica; ++core) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util.cc

    // every host, a failure will be returned.
    absl::StatusOr<llvm::SmallVector<llvm::SmallVector<ParsedDevice, 8>, 8>>
    GetTPUDevices(ParsedDevices devices,
                  llvm::ArrayRef<ParsedDevice> system_devices) {
      llvm::SmallVector<llvm::SmallVector<ParsedDevice, 8>, 8> tpu_devices;
      tpu_devices.reserve(system_devices.size());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 10 20:10:40 UTC 2024
    - 32.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

      }
      return mlir::success();
    }
    
    llvm::SmallVector<llvm::SmallVector<int64_t, 4>, 4> GetMetadataArgumentMapping(
        const tpu::TPUCompileMetadataProto& metadata) {
      llvm::SmallVector<llvm::SmallVector<int64_t, 4>, 4> input_mappings(
          metadata.num_cores_per_replica(), llvm::SmallVector<int64_t, 4>());
    
      if (metadata.num_cores_per_replica() == 1) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/utils.h

      SmallVector<int64_t, 8> perm_values;
      for (const auto& dim : perm_values_attr.getValues<APInt>())
        perm_values.push_back(dim.getSExtValue());
    
      // This should never happen unless the input graph is malformed.
      if (input_shape.size() != perm_values.size()) {
        return false;
      }
    
      SmallVector<int, 8> old_major_index_ordering;
      SmallVector<int, 8> new_major_index_ordering;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

                              Value &window_strides, Value &lhs_dilation,
                              Value &rhs_dilation, Value &feature_group_count,
                              int num_dims) {
      SmallVector<int32_t> lhs_dilation_values(num_dims - 2, 1);
      SmallVector<int32_t> stride_values, rhs_dilation_values;
      for (int64_t i : llvm::seq<int64_t>(1, num_dims - 1)) {
        stride_values.push_back(mlir::cast<IntegerAttr>(strides[i]).getInt());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/analysis/side_effect_analysis.h

      // pass the filter (returning true) will be included.
      const llvm::SmallVector<Operation*, 4>& DirectControlPredecessors(
          Operation* op) const;
      llvm::SmallVector<Operation*, 4> DirectControlPredecessors(
          Operation* op, llvm::function_ref<bool(Operation*)> filter) const;
    
      // pass the filter (returning true) will be included.
      const llvm::SmallVector<Operation*, 4>& DirectControlSuccessors(
          Operation* op) const;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util_test.cc

        parsed_devices->push_back(parsed_name);
      }
      return true;
    }
    
    using DeviceNames = llvm::SmallVector<std::string, 8>;
    
    struct ParameterizedDeviceSetTest
        : ::testing::TestWithParam<std::tuple<DeviceNames, std::string>> {};
    
    TEST_P(ParameterizedDeviceSetTest, BadDeviceSet) {
      llvm::SmallVector<Device, 8> devices;
      ASSERT_TRUE(DeviceNamesToParsedNames(std::get<0>(GetParam()), &devices));
      std::string topology_attr;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc

    // bytes that represent host endianness values.
    // The read_size parameter is present to allow reading both float16 and float32
    // without a case split.
    template <typename T>
    llvm::SmallVector<mlir::APInt> ReadAsHostEndian(ArrayRef<uint8_t> bytes) {
      llvm::SmallVector<mlir::APInt> ret;
      size_t read_size = sizeof(T);
      int bytes_len = bytes.size();
      assert(bytes_len % read_size == 0);
    
      int elem_count = bytes_len / read_size;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

      MLIRContext* context = backprop.getContext();
      SmallVector<int64_t, 4> values = {1, 1, 1, 1};
      auto attrs = llvm::map_range(values, [context](int64_t v) -> Attribute {
        return IntegerAttr::get(IntegerType::get(context, 64), APInt(64, v));
      });
      auto strides = ArrayAttr::get(context, llvm::to_vector<4>(attrs));
    
      // new result type.
      SmallVector<int64_t, 4> new_shape(new_filter_shape.begin(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
Back to top