diff --git a/WORKSPACE b/WORKSPACE index 29681ab91aa..8695c0e5f18 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,9 +5,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") git_repository( name = "ccv", - commit = "20d998dc3c7008060df6fdfa17e932c9dae93d31", + commit = "34d496a45f2a1ba0525349b3eae8c55c7f7ac214", remote = "https://github.com/liuliu/ccv.git", - shallow_since = "1729535387 -0400", + shallow_since = "1729877203 -0400", ) load("@ccv//config:ccv.bzl", "ccv_deps", "ccv_setting") diff --git a/deps.bzl b/deps.bzl index 2369ce96da2..aac5a4d2b8c 100644 --- a/deps.bzl +++ b/deps.bzl @@ -17,8 +17,8 @@ def s4nnc_deps(): git_repository, name = "ccv", remote = "https://github.com/liuliu/ccv.git", - commit = "20d998dc3c7008060df6fdfa17e932c9dae93d31", - shallow_since = "1729535387 -0400", + commit = "34d496a45f2a1ba0525349b3eae8c55c7f7ac214", + shallow_since = "1729877203 -0400", ) _maybe( diff --git a/nnc/DynamicGraph.swift b/nnc/DynamicGraph.swift index 9b49ec403ea..3c02b53ff2e 100644 --- a/nnc/DynamicGraph.swift +++ b/nnc/DynamicGraph.swift @@ -441,11 +441,13 @@ extension DynamicGraph.AnyTensor { if isAlias && (shape.count != self.shape.count || (strides != nil && strides != self.strides)) { // Check if strides not permuted. If it is permuted (and we shape to different sizes or have different strides), we need to first make a copy and then reshape again. let oldStrides = TensorShape(dims: oldStrides) - for i in 1..= oldStrides[i], - "The tensor is permuted, cannot reshape to \(shape), try .copied() before reshape.") + if oldStrides.count > 0 { + for i in 1..= oldStrides[i], + "The tensor is permuted, cannot reshape to \(shape), try .copied() before reshape.") + } } } let _alias = withUnsafePointer(to: &cOffset) { offset -> ccv_nnc_tensor_variable_t in