Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 192 for pushBack (0.12 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/folders.cc

        llvm::SmallVector<ElementsAttr> res;
        res.reserve(operation_->getNumOperands());
        for (auto opr : operation_->getOperands()) {
          auto op = llvm::dyn_cast<stablehlo::ConstantOp>(opr.getDefiningOp());
          res.push_back(op.getValue());
        }
        return res;
      }
    
      // Gets a pointer to the operation to be folded.
      Operation* Op() { return operation_; }
    
     private:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 06:11:55 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tpu_colocate_composite_resource_ops.cc

                        llvm::StringRef device) {
      builder->setInsertionPoint(op);
      auto launch = builder->create<tf_device::LaunchOp>(
          loc, builder->getStringAttr(device), op->getResultTypes());
      launch.getBody().push_back(new Block);
      op->replaceAllUsesWith(launch);
    
      builder->setInsertionPointToEnd(&launch.GetBody());
      builder->create<tf_device::ReturnOp>(loc, op->getResults());
    
      // Move op inside cluster.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 16 17:41:12 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  3. tensorflow/cc/gradients/resource_variable_grad.cc

    namespace {
    
    Status ReadVariableOpGrad(const Scope& scope, const Operation& op,
                              const std::vector<Output>& grad_inputs,
                              std::vector<Output>* grad_outputs) {
      grad_outputs->push_back(Identity(scope, grad_inputs[0]));
      return scope.status();
    }
    REGISTER_GRADIENT_OP("ReadVariableOp", ReadVariableOpGrad);
    
    }  // anonymous namespace
    }  // namespace ops
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 31 18:15:56 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/quantization/ir/ConvertSimQuant.cc

        SmallVector<double, 4> min, max;
        min.reserve(fqOp.getMin().size());
        max.reserve(fqOp.getMax().size());
        for (auto m : fqOp.getMin())
          min.push_back(cast<FloatAttr>(m).getValueAsDouble());
        for (auto m : fqOp.getMax())
          max.push_back(cast<FloatAttr>(m).getValueAsDouble());
    
        return fakeQuantAttrsToType(fqOp.getLoc(), fqOp.getNumBits(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_read_for_write.cc

      return false;
    }
    
    void TPUResourceReadForWritePass::runOnOperation() {
      SmallVector<tf_device::ClusterFuncOp, 4> cluster_funcs;
      getOperation().walk([&](tf_device::ClusterFuncOp cluster_func) {
        cluster_funcs.push_back(cluster_func);
      });
    
      OpBuilder builder(&getContext());
      // Add resource reads for resource writes from TPU cluster where for such
      // resources the TPU cluster does not read from.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 16:54:40 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc

            if (std::get<0>(result) == cluster_func_operand.value() &&
                llvm::isa<TF::TPUAnnotateTensorsWithDynamicShapeOp>(
                    std::get<1>(result).getDefiningOp())) {
              dynamic_shape_arg_index.push_back(cluster_func_operand.index());
            }
          }
        }
    
        cluster_func_op->setAttr(TF::kDynamicArgIndexAttr,
                                 builder.getI32ArrayAttr(dynamic_shape_arg_index));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  7. tensorflow/cc/experimental/base/tests/tensor_test.cc

      TF_DataType dtype = TypeParam::kDType;
      // This is our 1D tensor of varying dtype.
      std::vector<typename TypeParam::type> value = {42, 100, 0, 1, 4, 29};
      // Shape is Rank 1 vector.
      std::vector<int64_t> shape;
      shape.push_back(value.size());
    
      Tensor tensor = Tensor::FromBuffer(
          /*dtype=*/dtype, /*shape=*/shape,
          /*data=*/value.data(),
          /*len=*/value.size() * sizeof(typename TypeParam::type),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 09:56:08 UTC 2024
    - 6K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/xla_gpu_device.cc

      }
    
      int device_count = platform.value()->VisibleDeviceCount();
      if (device_count <= 0) {
        return absl::OkStatus();
      }
    
      for (int i = 0; i < device_count; ++i) {
        devices->push_back(
            absl::StrCat("/physical_device:", DEVICE_XLA_GPU, ":", i));
      }
    
      return absl::OkStatus();
    }
    
    Status XlaGpuDeviceFactory::CreateDevices(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/cluster_scoping_pass.cc

    }
    
    void ClusterScopingPassImpl::AddScopeToAllTransitivePredecessors(Node* start) {
      const string unique_suffix = absl::StrCat("_", GetUniqueScopeId());
    
      std::vector<Node*> starts;
      starts.push_back(start);
      auto enter = [&](Node* n) { AddOrAppendXlaInternalScope(n, unique_suffix); };
      ReverseDFSFrom(*graph_, starts, enter, /*leave=*/nullptr,
                     /*stable_comparator=*/NodeComparatorName());
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/constant_fold.cc

          // addressed.
          inst->isRegistered()) {
        for (Type ty : inst->getResultTypes()) {
          auto shaped_ty = mlir::cast<ShapedType>(ty);
          results.push_back(
              DenseElementsAttr::get(shaped_ty, llvm::ArrayRef<Attribute>()));
        }
        return success();
      }
    
      // Returns directly if any of the operands is not an elements attributes.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top