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

Commit 1ed2bc7

Browse files
Shashi456dan-zheng
authored andcommitted
Regenerate TensorFlow raw ops from v2.1.0-rc1 (#621)
1 parent 723d17a commit 1ed2bc7

File tree

7 files changed

+8895
-2375
lines changed

7 files changed

+8895
-2375
lines changed

Sources/TensorFlow/Bindings/EagerExecution.swift

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,4 +563,243 @@ internal struct TFE_Op: TFTensorOperation {
563563
return result
564564
}
565565

566+
@inlinable @inline(__always)
567+
internal func execute<T0: TensorArrayProtocol, T1: TensorArrayProtocol, T2: TensorArrayProtocol, T3: TensorArrayProtocol, T4: TensorArrayProtocol, T5: TensorArrayProtocol, T6: TensorArrayProtocol, T7: TensorArrayProtocol, T8: TensorArrayProtocol, T9: TensorArrayProtocol, T10: TensorArrayProtocol>(
568+
_ count0: Int,
569+
_ count1: Int,
570+
_ count2: Int,
571+
_ count3: Int,
572+
_ count4: Int,
573+
_ count5: Int,
574+
_ count6: Int,
575+
_ count7: Int,
576+
_ count8: Int,
577+
_ count9: Int,
578+
_ count10: Int
579+
) -> (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) {
580+
let buffer = evaluateUnsafe()
581+
let offset0 = Int32(0)
582+
let offset1 = offset0 + Int32(count0)
583+
let offset2 = offset1 + Int32(count1)
584+
let offset3 = offset2 + Int32(count2)
585+
let offset4 = offset3 + Int32(count3)
586+
let offset5 = offset4 + Int32(count4)
587+
let offset6 = offset5 + Int32(count5)
588+
let offset7 = offset6 + Int32(count6)
589+
let offset8 = offset7 + Int32(count7)
590+
let offset9 = offset8 + Int32(count8)
591+
let offset10 = offset9 + Int32(count9)
592+
let result = (
593+
T0.init(_owning: buffer.advanced(by: Int(offset0)), count: count0),
594+
T1.init(_owning: buffer.advanced(by: Int(offset1)), count: count1),
595+
T2.init(_owning: buffer.advanced(by: Int(offset2)), count: count2),
596+
T3.init(_owning: buffer.advanced(by: Int(offset3)), count: count3),
597+
T4.init(_owning: buffer.advanced(by: Int(offset4)), count: count4),
598+
T5.init(_owning: buffer.advanced(by: Int(offset5)), count: count5),
599+
T6.init(_owning: buffer.advanced(by: Int(offset6)), count: count6),
600+
T7.init(_owning: buffer.advanced(by: Int(offset7)), count: count7),
601+
T8.init(_owning: buffer.advanced(by: Int(offset8)), count: count8),
602+
T9.init(_owning: buffer.advanced(by: Int(offset9)), count: count9),
603+
T10.init(_owning: buffer.advanced(by: Int(offset10)), count: count10))
604+
buffer.deallocate()
605+
return result
606+
}
607+
608+
@inlinable @inline(__always)
609+
internal func execute<T0: TensorArrayProtocol, T1: TensorArrayProtocol, T2: TensorArrayProtocol, T3: TensorArrayProtocol, T4: TensorArrayProtocol, T5: TensorArrayProtocol, T6: TensorArrayProtocol, T7: TensorArrayProtocol, T8: TensorArrayProtocol, T9: TensorArrayProtocol, T10: TensorArrayProtocol, T11: TensorArrayProtocol>(
610+
_ count0: Int,
611+
_ count1: Int,
612+
_ count2: Int,
613+
_ count3: Int,
614+
_ count4: Int,
615+
_ count5: Int,
616+
_ count6: Int,
617+
_ count7: Int,
618+
_ count8: Int,
619+
_ count9: Int,
620+
_ count10: Int,
621+
_ count11: Int
622+
) -> (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) {
623+
let buffer = evaluateUnsafe()
624+
let offset0 = Int32(0)
625+
let offset1 = offset0 + Int32(count0)
626+
let offset2 = offset1 + Int32(count1)
627+
let offset3 = offset2 + Int32(count2)
628+
let offset4 = offset3 + Int32(count3)
629+
let offset5 = offset4 + Int32(count4)
630+
let offset6 = offset5 + Int32(count5)
631+
let offset7 = offset6 + Int32(count6)
632+
let offset8 = offset7 + Int32(count7)
633+
let offset9 = offset8 + Int32(count8)
634+
let offset10 = offset9 + Int32(count9)
635+
let offset11 = offset10 + Int32(count10)
636+
let result = (
637+
T0.init(_owning: buffer.advanced(by: Int(offset0)), count: count0),
638+
T1.init(_owning: buffer.advanced(by: Int(offset1)), count: count1),
639+
T2.init(_owning: buffer.advanced(by: Int(offset2)), count: count2),
640+
T3.init(_owning: buffer.advanced(by: Int(offset3)), count: count3),
641+
T4.init(_owning: buffer.advanced(by: Int(offset4)), count: count4),
642+
T5.init(_owning: buffer.advanced(by: Int(offset5)), count: count5),
643+
T6.init(_owning: buffer.advanced(by: Int(offset6)), count: count6),
644+
T7.init(_owning: buffer.advanced(by: Int(offset7)), count: count7),
645+
T8.init(_owning: buffer.advanced(by: Int(offset8)), count: count8),
646+
T9.init(_owning: buffer.advanced(by: Int(offset9)), count: count9),
647+
T10.init(_owning: buffer.advanced(by: Int(offset10)), count: count10),
648+
T11.init(_owning: buffer.advanced(by: Int(offset11)), count: count11))
649+
buffer.deallocate()
650+
return result
651+
}
652+
653+
@inlinable @inline(__always)
654+
internal func execute<T0: TensorArrayProtocol, T1: TensorArrayProtocol, T2: TensorArrayProtocol, T3: TensorArrayProtocol, T4: TensorArrayProtocol, T5: TensorArrayProtocol, T6: TensorArrayProtocol, T7: TensorArrayProtocol, T8: TensorArrayProtocol, T9: TensorArrayProtocol, T10: TensorArrayProtocol, T11: TensorArrayProtocol, T12: TensorArrayProtocol>(
655+
_ count0: Int,
656+
_ count1: Int,
657+
_ count2: Int,
658+
_ count3: Int,
659+
_ count4: Int,
660+
_ count5: Int,
661+
_ count6: Int,
662+
_ count7: Int,
663+
_ count8: Int,
664+
_ count9: Int,
665+
_ count10: Int,
666+
_ count11: Int,
667+
_ count12: Int
668+
) -> (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) {
669+
let buffer = evaluateUnsafe()
670+
let offset0 = Int32(0)
671+
let offset1 = offset0 + Int32(count0)
672+
let offset2 = offset1 + Int32(count1)
673+
let offset3 = offset2 + Int32(count2)
674+
let offset4 = offset3 + Int32(count3)
675+
let offset5 = offset4 + Int32(count4)
676+
let offset6 = offset5 + Int32(count5)
677+
let offset7 = offset6 + Int32(count6)
678+
let offset8 = offset7 + Int32(count7)
679+
let offset9 = offset8 + Int32(count8)
680+
let offset10 = offset9 + Int32(count9)
681+
let offset11 = offset10 + Int32(count10)
682+
let offset12 = offset11 + Int32(count11)
683+
let result = (
684+
T0.init(_owning: buffer.advanced(by: Int(offset0)), count: count0),
685+
T1.init(_owning: buffer.advanced(by: Int(offset1)), count: count1),
686+
T2.init(_owning: buffer.advanced(by: Int(offset2)), count: count2),
687+
T3.init(_owning: buffer.advanced(by: Int(offset3)), count: count3),
688+
T4.init(_owning: buffer.advanced(by: Int(offset4)), count: count4),
689+
T5.init(_owning: buffer.advanced(by: Int(offset5)), count: count5),
690+
T6.init(_owning: buffer.advanced(by: Int(offset6)), count: count6),
691+
T7.init(_owning: buffer.advanced(by: Int(offset7)), count: count7),
692+
T8.init(_owning: buffer.advanced(by: Int(offset8)), count: count8),
693+
T9.init(_owning: buffer.advanced(by: Int(offset9)), count: count9),
694+
T10.init(_owning: buffer.advanced(by: Int(offset10)), count: count10),
695+
T11.init(_owning: buffer.advanced(by: Int(offset11)), count: count11),
696+
T12.init(_owning: buffer.advanced(by: Int(offset12)), count: count12))
697+
buffer.deallocate()
698+
return result
699+
}
700+
701+
@inlinable @inline(__always)
702+
internal func execute<T0: TensorArrayProtocol, T1: TensorArrayProtocol, T2: TensorArrayProtocol, T3: TensorArrayProtocol, T4: TensorArrayProtocol, T5: TensorArrayProtocol, T6: TensorArrayProtocol, T7: TensorArrayProtocol, T8: TensorArrayProtocol, T9: TensorArrayProtocol, T10: TensorArrayProtocol, T11: TensorArrayProtocol, T12: TensorArrayProtocol, T13: TensorArrayProtocol>(
703+
_ count0: Int,
704+
_ count1: Int,
705+
_ count2: Int,
706+
_ count3: Int,
707+
_ count4: Int,
708+
_ count5: Int,
709+
_ count6: Int,
710+
_ count7: Int,
711+
_ count8: Int,
712+
_ count9: Int,
713+
_ count10: Int,
714+
_ count11: Int,
715+
_ count12: Int,
716+
_ count13: Int
717+
) -> (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) {
718+
let buffer = evaluateUnsafe()
719+
let offset0 = Int32(0)
720+
let offset1 = offset0 + Int32(count0)
721+
let offset2 = offset1 + Int32(count1)
722+
let offset3 = offset2 + Int32(count2)
723+
let offset4 = offset3 + Int32(count3)
724+
let offset5 = offset4 + Int32(count4)
725+
let offset6 = offset5 + Int32(count5)
726+
let offset7 = offset6 + Int32(count6)
727+
let offset8 = offset7 + Int32(count7)
728+
let offset9 = offset8 + Int32(count8)
729+
let offset10 = offset9 + Int32(count9)
730+
let offset11 = offset10 + Int32(count10)
731+
let offset12 = offset11 + Int32(count11)
732+
let offset13 = offset12 + Int32(count12)
733+
let result = (
734+
T0.init(_owning: buffer.advanced(by: Int(offset0)), count: count0),
735+
T1.init(_owning: buffer.advanced(by: Int(offset1)), count: count1),
736+
T2.init(_owning: buffer.advanced(by: Int(offset2)), count: count2),
737+
T3.init(_owning: buffer.advanced(by: Int(offset3)), count: count3),
738+
T4.init(_owning: buffer.advanced(by: Int(offset4)), count: count4),
739+
T5.init(_owning: buffer.advanced(by: Int(offset5)), count: count5),
740+
T6.init(_owning: buffer.advanced(by: Int(offset6)), count: count6),
741+
T7.init(_owning: buffer.advanced(by: Int(offset7)), count: count7),
742+
T8.init(_owning: buffer.advanced(by: Int(offset8)), count: count8),
743+
T9.init(_owning: buffer.advanced(by: Int(offset9)), count: count9),
744+
T10.init(_owning: buffer.advanced(by: Int(offset10)), count: count10),
745+
T11.init(_owning: buffer.advanced(by: Int(offset11)), count: count11),
746+
T12.init(_owning: buffer.advanced(by: Int(offset12)), count: count12),
747+
T13.init(_owning: buffer.advanced(by: Int(offset13)), count: count13))
748+
buffer.deallocate()
749+
return result
750+
}
751+
752+
@inlinable @inline(__always)
753+
internal func execute<T0: TensorArrayProtocol, T1: TensorArrayProtocol, T2: TensorArrayProtocol, T3: TensorArrayProtocol, T4: TensorArrayProtocol, T5: TensorArrayProtocol, T6: TensorArrayProtocol, T7: TensorArrayProtocol, T8: TensorArrayProtocol, T9: TensorArrayProtocol, T10: TensorArrayProtocol, T11: TensorArrayProtocol, T12: TensorArrayProtocol, T13: TensorArrayProtocol, T14: TensorArrayProtocol>(
754+
_ count0: Int,
755+
_ count1: Int,
756+
_ count2: Int,
757+
_ count3: Int,
758+
_ count4: Int,
759+
_ count5: Int,
760+
_ count6: Int,
761+
_ count7: Int,
762+
_ count8: Int,
763+
_ count9: Int,
764+
_ count10: Int,
765+
_ count11: Int,
766+
_ count12: Int,
767+
_ count13: Int,
768+
_ count14: Int
769+
) -> (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) {
770+
let buffer = evaluateUnsafe()
771+
let offset0 = Int32(0)
772+
let offset1 = offset0 + Int32(count0)
773+
let offset2 = offset1 + Int32(count1)
774+
let offset3 = offset2 + Int32(count2)
775+
let offset4 = offset3 + Int32(count3)
776+
let offset5 = offset4 + Int32(count4)
777+
let offset6 = offset5 + Int32(count5)
778+
let offset7 = offset6 + Int32(count6)
779+
let offset8 = offset7 + Int32(count7)
780+
let offset9 = offset8 + Int32(count8)
781+
let offset10 = offset9 + Int32(count9)
782+
let offset11 = offset10 + Int32(count10)
783+
let offset12 = offset11 + Int32(count11)
784+
let offset13 = offset12 + Int32(count12)
785+
let offset14 = offset13 + Int32(count13)
786+
let result = (
787+
T0.init(_owning: buffer.advanced(by: Int(offset0)), count: count0),
788+
T1.init(_owning: buffer.advanced(by: Int(offset1)), count: count1),
789+
T2.init(_owning: buffer.advanced(by: Int(offset2)), count: count2),
790+
T3.init(_owning: buffer.advanced(by: Int(offset3)), count: count3),
791+
T4.init(_owning: buffer.advanced(by: Int(offset4)), count: count4),
792+
T5.init(_owning: buffer.advanced(by: Int(offset5)), count: count5),
793+
T6.init(_owning: buffer.advanced(by: Int(offset6)), count: count6),
794+
T7.init(_owning: buffer.advanced(by: Int(offset7)), count: count7),
795+
T8.init(_owning: buffer.advanced(by: Int(offset8)), count: count8),
796+
T9.init(_owning: buffer.advanced(by: Int(offset9)), count: count9),
797+
T10.init(_owning: buffer.advanced(by: Int(offset10)), count: count10),
798+
T11.init(_owning: buffer.advanced(by: Int(offset11)), count: count11),
799+
T12.init(_owning: buffer.advanced(by: Int(offset12)), count: count12),
800+
T13.init(_owning: buffer.advanced(by: Int(offset13)), count: count13),
801+
T14.init(_owning: buffer.advanced(by: Int(offset14)), count: count14))
802+
buffer.deallocate()
803+
return result
804+
}
566805
}

Sources/TensorFlow/Bindings/EagerExecution.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ internal struct TFE_Op: TFTensorOperation {
308308
let _ = evaluateUnsafe()
309309
}
310310

311-
%for n in range(1, 10 + 1):
311+
%for n in range(1, 14 + 1):
312312
@inlinable @inline(__always)
313313
internal func execute<${", ".join(["T" + str(i) + ": TensorArrayProtocol" for i in range(n)])}>(
314314
${",\n ".join(["_ count" + str(i) + ": Int" for i in range(n)])}

0 commit comments

Comments
 (0)