- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for cc_status (0.13 sec)
-
tensorflow/c/tf_status_helper_test.cc
namespace tsl { namespace { TEST(StatusHelper, TestStatusHelper) { TSL_Status* s = TSL_NewStatus(); absl::Status cc_status(absl::InvalidArgumentError("some error")); cc_status.SetPayload("key1", absl::Cord("value1")); cc_status.SetPayload("key2", absl::Cord("value2")); Set_TF_Status_from_Status(s, cc_status); ASSERT_EQ(TSL_INVALID_ARGUMENT, TSL_GetCode(s)); ASSERT_EQ(std::string("some error"), TSL_Message(s));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun Apr 14 21:57:32 UTC 2024 - 1.7K bytes - Viewed (0) -
tensorflow/c/tf_status_helper.h
#include <utility> #include "tensorflow/c/tf_status.h" #include "tsl/platform/status.h" namespace tsl { // Set the attribute of "tf_status" from the attributes of "status". void Set_TF_Status_from_Status(TF_Status* tf_status, const absl::Status& status); // Returns a "status" from "tf_status". absl::Status StatusFromTF_Status(const TF_Status* tf_status); } // namespace tsl namespace tensorflow {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun Apr 14 21:57:32 UTC 2024 - 2.9K bytes - Viewed (0) -
tensorflow/c/tf_status.h
// Return a new status object. TF_CAPI_EXPORT extern TF_Status* TF_NewStatus(void); // Delete a previously created status object. TF_CAPI_EXPORT extern void TF_DeleteStatus(TF_Status*); // Record <code, msg> in *s. Any previous information is lost. // A common use is to clear a status: TF_SetStatus(s, TF_OK, ""); TF_CAPI_EXPORT extern void TF_SetStatus(TF_Status* s, TF_Code code,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 12 20:00:09 UTC 2024 - 3.9K bytes - Viewed (0) -
tensorflow/c/experimental/stream_executor/stream_executor_internal.h
int VisibleDeviceCount() const override { int visible_device_count = 0; tensorflow::TF_StatusPtr c_status(TF_NewStatus()); platform_fns_.get_device_count(&platform_, &visible_device_count, c_status.get()); if (TF_GetCode(c_status.get()) != TF_OK) { LOG(ERROR) << TF_Message(c_status.get()); return 0; } return visible_device_count; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Jun 14 07:39:19 UTC 2024 - 8K bytes - Viewed (0) -
tensorflow/c/tf_status_helper.cc
std::string value_str(value); TF_SetPayload(tf_status, key_str.c_str(), value_str.c_str()); }); } absl::Status StatusFromTF_Status(const TF_Status* tf_status) { absl::Status status(StatusCodeFromTSLCode(TF_GetCode(tf_status)), TF_Message(tf_status)); TF_ForEachPayload( tf_status, [](const char* key, const char* value, void* capture) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 23 06:12:29 UTC 2024 - 1.7K bytes - Viewed (0) -
tensorflow/c/kernels/ops/bitcast.cc
#include "tensorflow/c/tf_status.h" #include "tensorflow/core/framework/registration/registration.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/macros.h" static void ComputeNewShape(TF_ShapeInferenceContext* ctx, TF_ShapeHandle* shape, TF_DataType input_type, TF_DataType output_type, TF_Status* status) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 07:51:50 UTC 2024 - 5.1K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental.cc
void TF_SetTracingImplementation(const char* name, TF_Status* s) { tsl::Set_TF_Status_from_Status(s, SetDefaultTracingEngine(name)); } // Creates a new TensorFlow function, it is an execution context attached to a // given tracing context. TF_ExecutionContext* TF_CreateFunction(const char* fn_name, TF_Status* s) { return wrap(CreateTracingExecutionContext(fn_name, s)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 10:15:17 UTC 2024 - 9K bytes - Viewed (0) -
tensorflow/c/eager/unified_api_testutil.cc
#include "tensorflow/c/tf_status.h" #include "tensorflow/c/tf_status_helper.h" #include "tensorflow/core/framework/tensor_shape.h" #include "tensorflow/core/lib/llvm_rtti/llvm_rtti.h" #include "tensorflow/core/platform/errors.h" namespace tensorflow { AbstractContext* BuildFunction(const char* fn_name) { std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Feb 27 13:57:45 UTC 2024 - 5.7K bytes - Viewed (0) -
tensorflow/c/c_test.c
TF_DataType type; TF_Status* s = TF_NewStatus(); TF_OpKernelConstruction_GetAttrType(ctx, "foobar", &type, s); TF_DeleteStatus(s); return NULL; } // A compute function. This will never actually get called in this test, it's // just nice to know that it compiles. void compute(void* kernel, TF_OpKernelContext* ctx) { TF_Tensor* input; TF_Status* s = TF_NewStatus(); TF_GetInput(ctx, 0, &input, s);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:50:35 UTC 2024 - 2.8K bytes - Viewed (0) -
tensorflow/c/eager/unified_api_testutil.h
Status TestTensorHandleWithDims(AbstractContext* ctx, const T* data, const int64_t* dims, int num_dims, AbstractTensorHandle** tensor) { std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status( TF_NewStatus(), TF_DeleteStatus); TFE_Context* eager_ctx = TF_ExecutionContextGetTFEContext(wrap(ctx), status.get()); TF_RETURN_IF_ERROR(StatusFromTF_Status(status.get()));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Feb 27 13:57:45 UTC 2024 - 4K bytes - Viewed (0)