Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 7d0b78d

Browse files
committed
Remove unused setAttrShapeList
1 parent 71f6f69 commit 7d0b78d

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

Sources/TensorFlow/Core/Runtime.swift

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,38 +1193,6 @@ func _TFCOpSetAttrTypeArray(
11931193
}
11941194
}
11951195

1196-
/// Given dimensions and ranks in the form described below, makes the appropriate call to
1197-
/// `TFE_OpSetAttrShapeList(op, attrName, ..., status)`.
1198-
///
1199-
/// - Parameters
1200-
/// - flattenedDims: all the shapes' dimensions concatenated together in order.
1201-
/// - ranks: all the shapes' ranks (-1 denotes unknown rank).
1202-
fileprivate func setAttrShapeList(
1203-
op: CTFEOp,
1204-
attrName: UnsafePointer<Int8>,
1205-
flattenedDims: Array<Int64>,
1206-
ranks: Array<Int32>,
1207-
status: CTFStatus
1208-
) {
1209-
flattenedDims.withUnsafeBufferPointer { flattenedDimsBuffer in
1210-
var dimsPtr: UnsafePointer<Int64>? = flattenedDimsBuffer.baseAddress
1211-
var dims: [UnsafePointer<Int64>?] = []
1212-
for rank in ranks {
1213-
dims.append(dimsPtr)
1214-
if rank >= 0 {
1215-
dimsPtr = dimsPtr.map { $0.advanced(by: Int(rank)) }
1216-
}
1217-
}
1218-
dims.withUnsafeMutableBufferPointer { dimsBuffer in
1219-
ranks.withUnsafeBufferPointer { ranksBuffer in
1220-
TFE_OpSetAttrShapeList(
1221-
op, attrName, dimsBuffer.baseAddress, ranksBuffer.baseAddress,
1222-
Int32(ranksBuffer.count), status)
1223-
}
1224-
}
1225-
}
1226-
}
1227-
12281196
/// A class to keep around thread local state.
12291197
class _ThreadLocalState {
12301198
var deviceScopes = DeviceScopes()

0 commit comments

Comments
 (0)