@@ -1193,38 +1193,6 @@ func _TFCOpSetAttrTypeArray(
1193
1193
}
1194
1194
}
1195
1195
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
-
1228
1196
/// Stack of devices that models nested calls to withDevice/withDefaultDevice. Devices are
1229
1197
/// represented by their names in TensorFlow notation. See documentation for
1230
1198
/// `withDevice(named:perform:)` to learn about device names.
0 commit comments