Skip to content

Commit e249c23

Browse files
committed
lint
1 parent a93f9cd commit e249c23

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

backends/cuda/runtime/cuda_backend.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,7 @@ class ET_EXPERIMENTAL CudaBackend final
669669
const std::string& method_name) const {
670670
// Check if the required APIs are available
671671
if (!handle->get_num_constants || !handle->get_constant_name ||
672-
!handle->get_constant_original_fqn ||
673-
!handle->extract_constants_map ||
672+
!handle->get_constant_original_fqn || !handle->extract_constants_map ||
674673
!handle->update_user_managed_constant_buffer_pairs) {
675674
// Fall back to the legacy path
676675
return load_constants_legacy(handle, named_data_map, method_name);
@@ -757,7 +756,8 @@ class ET_EXPERIMENTAL CudaBackend final
757756
std::lock_guard<std::mutex> guard(shared_constants_mutex_);
758757
for (const auto& fqn : uncached_fqns) {
759758
auto it_name = fqn_to_name.find(fqn);
760-
if (it_name == fqn_to_name.end()) continue;
759+
if (it_name == fqn_to_name.end())
760+
continue;
761761
// extract_constants_map returns entries keyed by FQN
762762
auto it = extracted_map.find(fqn);
763763
if (it != extracted_map.end()) {
@@ -771,7 +771,10 @@ class ET_EXPERIMENTAL CudaBackend final
771771
method_name.c_str(),
772772
shared_constant_tensors_.size());
773773
} else {
774-
ET_LOG(Error, "Failed to extract constants from '%s'", method_name.c_str());
774+
ET_LOG(
775+
Error,
776+
"Failed to extract constants from '%s'",
777+
method_name.c_str());
775778
return Error::Internal;
776779
}
777780
} else {
@@ -835,8 +838,7 @@ class ET_EXPERIMENTAL CudaBackend final
835838
ET_LOG(Info, "Found %s in named data map", weights_blob_key.c_str());
836839
const void* weights_blob = buffer_res->data();
837840
auto update_err = handle->update_constants_from_blob(
838-
handle->container_handle,
839-
static_cast<const uint8_t*>(weights_blob));
841+
handle->container_handle, static_cast<const uint8_t*>(weights_blob));
840842
if (update_err != Error::Ok) {
841843
ET_LOG(Error, "update_constants_from_blob failed");
842844
return update_err;

0 commit comments

Comments
 (0)