Skip to content

Commit

Permalink
Fix a few other loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Mar 15, 2024
1 parent 2e85afa commit e9b31c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nnc/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3401,7 +3401,8 @@ private let q8pDecodeJitWithExternalEager:
}
guard
TensorShape(dims: params.dim).reduce(1, *) == numberOfElements
&& (numberOfElements % 4) == 0 // We support non-block size length for q8p only.
&& (numberOfElements % (256 * 4)) == 0
&& (blockSize % (256 * 4)) == 0 // We support non-block size length for q8p only.
else {
let mappedData = store.loadBytes(offset: offset, length: length)
defer {
Expand Down Expand Up @@ -3773,7 +3774,8 @@ private let q8pDecodeJitWithExternalOnDemand:
}
guard
TensorShape(dims: params.dim).reduce(1, *) == numberOfElements
&& (numberOfElements % 4) == 0 // We support non-block size length for q8p only.
&& (numberOfElements % (256 * 4)) == 0
&& (blockSize % (256 * 4)) == 0 // We support non-block size length for q8p only.
else {
let mappedData = store.loadBytes(offset: offset, length: length)
defer {
Expand Down

0 comments on commit e9b31c4

Please sign in to comment.