Comments (2)
Dumped deabstraction/partitioning intermediates
--- TFDeabstraction Input: main
// main
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
alloc_global @$S4test1a10TensorFlow0B0VySdGvp // id: %2
%3 = global_addr @$S4test1a10TensorFlow0B0VySdGvp : $*Tensor<Double> // users: %67, %63, %60
%4 = metatype $@thin Tensor<Double>.Type // user: %59
%5 = metatype $@thin Tensor2D<Double>.Type // user: %57
%6 = integer_literal $Builtin.Word, 2 // user: %8
// function_ref _allocateUninitializedArray<A>(_:)
%7 = function_ref @$Ss27_allocateUninitializedArrayySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %8
%8 = apply %7<Tensor1D<Double>>(%6) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %12, %9, %11
%9 = tuple_extract %8 : $(Array<Tensor1D<Double>>, Builtin.RawPointer), 0 // users: %57, %10
retain_value %9 : $Array<Tensor1D<Double>> // id: %10
%11 = tuple_extract %8 : $(Array<Tensor1D<Double>>, Builtin.RawPointer), 1 // user: %13
release_value %8 : $(Array<Tensor1D<Double>>, Builtin.RawPointer) // id: %12
%13 = pointer_to_address %11 : $Builtin.RawPointer to [strict] $*Tensor1D<Double> // users: %33, %35
%14 = metatype $@thin Tensor1D<Double>.Type // user: %32
%15 = integer_literal $Builtin.Word, 2 // user: %17
// function_ref _allocateUninitializedArray<A>(_:)
%16 = function_ref @$Ss27_allocateUninitializedArrayySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %17
%17 = apply %16<Double>(%15) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %21, %18, %20
%18 = tuple_extract %17 : $(Array<Double>, Builtin.RawPointer), 0 // users: %32, %19
retain_value %18 : $Array<Double> // id: %19
%20 = tuple_extract %17 : $(Array<Double>, Builtin.RawPointer), 1 // user: %22
release_value %17 : $(Array<Double>, Builtin.RawPointer) // id: %21
%22 = pointer_to_address %20 : $Builtin.RawPointer to [strict] $*Double // users: %25, %27
%23 = float_literal $Builtin.FPIEEE64, 0x3FF0000000000000 // 1 // user: %24
%24 = struct $Double (%23 : $Builtin.FPIEEE64) // user: %25
store %24 to %22 : $*Double // id: %25
%26 = integer_literal $Builtin.Word, 1 // user: %27
%27 = index_addr %22 : $*Double, %26 : $Builtin.Word // user: %30
%28 = float_literal $Builtin.FPIEEE64, 0x4000000000000000 // 2 // user: %29
%29 = struct $Double (%28 : $Builtin.FPIEEE64) // user: %30
store %29 to %27 : $*Double // id: %30
// function_ref Tensor1D.init(arrayLiteral:)
%31 = function_ref @$S10TensorFlow8Tensor1DV12arrayLiteralACyxGxd_tcfC : $@convention(method) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>, @thin Tensor1D<τ_0_0>.Type) -> @owned Tensor1D<τ_0_0> // user: %32
%32 = apply %31<Double>(%18, %14) : $@convention(method) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>, @thin Tensor1D<τ_0_0>.Type) -> @owned Tensor1D<τ_0_0> // user: %33
store %32 to %13 : $*Tensor1D<Double> // id: %33
%34 = integer_literal $Builtin.Word, 1 // user: %35
%35 = index_addr %13 : $*Tensor1D<Double>, %34 : $Builtin.Word // user: %55
%36 = metatype $@thin Tensor1D<Double>.Type // user: %54
%37 = integer_literal $Builtin.Word, 2 // user: %39
// function_ref _allocateUninitializedArray<A>(_:)
%38 = function_ref @$Ss27_allocateUninitializedArrayySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %39
%39 = apply %38<Double>(%37) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %43, %40, %42
%40 = tuple_extract %39 : $(Array<Double>, Builtin.RawPointer), 0 // users: %54, %41
retain_value %40 : $Array<Double> // id: %41
%42 = tuple_extract %39 : $(Array<Double>, Builtin.RawPointer), 1 // user: %44
release_value %39 : $(Array<Double>, Builtin.RawPointer) // id: %43
%44 = pointer_to_address %42 : $Builtin.RawPointer to [strict] $*Double // users: %47, %49
%45 = float_literal $Builtin.FPIEEE64, 0x4008000000000000 // 3 // user: %46
%46 = struct $Double (%45 : $Builtin.FPIEEE64) // user: %47
store %46 to %44 : $*Double // id: %47
%48 = integer_literal $Builtin.Word, 1 // user: %49
%49 = index_addr %44 : $*Double, %48 : $Builtin.Word // user: %52
%50 = float_literal $Builtin.FPIEEE64, 0x4010000000000000 // 4 // user: %51
%51 = struct $Double (%50 : $Builtin.FPIEEE64) // user: %52
store %51 to %49 : $*Double // id: %52
// function_ref Tensor1D.init(arrayLiteral:)
%53 = function_ref @$S10TensorFlow8Tensor1DV12arrayLiteralACyxGxd_tcfC : $@convention(method) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>, @thin Tensor1D<τ_0_0>.Type) -> @owned Tensor1D<τ_0_0> // user: %54
%54 = apply %53<Double>(%40, %36) : $@convention(method) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>, @thin Tensor1D<τ_0_0>.Type) -> @owned Tensor1D<τ_0_0> // user: %55
store %54 to %35 : $*Tensor1D<Double> // id: %55
// function_ref Tensor2D.init(arrayLiteral:)
%56 = function_ref @$S10TensorFlow8Tensor2DV12arrayLiteralACyxGAA8Tensor1DVyxGd_tcfC : $@convention(method) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<Tensor1D<τ_0_0>>, @thin Tensor2D<τ_0_0>.Type) -> @owned Tensor2D<τ_0_0> // user: %57
%57 = apply %56<Double>(%9, %5) : $@convention(method) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<Tensor1D<τ_0_0>>, @thin Tensor2D<τ_0_0>.Type) -> @owned Tensor2D<τ_0_0> // user: %59
// function_ref Tensor.init(_:)
%58 = function_ref @$S10TensorFlow0A0VyACyxGAA8Tensor2DVyxGcfC : $@convention(method) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Tensor2D<τ_0_0>, @thin Tensor<τ_0_0>.Type) -> @owned Tensor<τ_0_0> // user: %59
%59 = apply %58<Double>(%57, %4) : $@convention(method) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Tensor2D<τ_0_0>, @thin Tensor<τ_0_0>.Type) -> @owned Tensor<τ_0_0> // user: %60
store %59 to %3 : $*Tensor<Double> // id: %60
alloc_global @$S4test3dot10TensorFlow0C0VySdGvp // id: %61
%62 = global_addr @$S4test3dot10TensorFlow0C0VySdGvp : $*Tensor<Double> // user: %72
%63 = load %3 : $*Tensor<Double> // users: %66, %64
retain_value %63 : $Tensor<Double> // id: %64
%65 = alloc_stack $Tensor<Double> // users: %66, %75, %74, %72
store %63 to %65 : $*Tensor<Double> // id: %66
%67 = load %3 : $*Tensor<Double> // users: %70, %68
retain_value %67 : $Tensor<Double> // id: %68
%69 = alloc_stack $Tensor<Double> // users: %70, %73, %72
store %67 to %69 : $*Tensor<Double> // id: %70
// function_ref TensorProtocol<>.dot(_:)
%71 = function_ref @$S10TensorFlow0A8ProtocolPAAs7Numeric6ScalarRpzrlE3dotyxxF : $@convention(method) <τ_0_0 where τ_0_0 : TensorProtocol, τ_0_0.Scalar : Numeric> (@in τ_0_0, @in_guaranteed τ_0_0) -> @out τ_0_0 // user: %72
%72 = apply %71<Tensor<Double>, Double>(%62, %69, %65) : $@convention(method) <τ_0_0 where τ_0_0 : TensorProtocol, τ_0_0.Scalar : Numeric> (@in τ_0_0, @in_guaranteed τ_0_0) -> @out τ_0_0
dealloc_stack %69 : $*Tensor<Double> // id: %73
destroy_addr %65 : $*Tensor<Double> // id: %74
dealloc_stack %65 : $*Tensor<Double> // id: %75
// function_ref foo()
%76 = function_ref @$S4test3fooyyF : $@convention(thin) () -> () // user: %77
%77 = apply %76() : $@convention(thin) () -> ()
%78 = integer_literal $Builtin.Int32, 0 // user: %79
%79 = struct $Int32 (%78 : $Builtin.Int32) // user: %80
return %79 : $Int32 // id: %80
} // end sil function 'main'
----
--- TFDeabstraction Result: main
// main
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
alloc_global @$S4test1a10TensorFlow0B0VySdGvp // id: %2
%3 = global_addr @$S4test1a10TensorFlow0B0VySdGvp : $*Tensor<Double> // user: %171
%4 = integer_literal $Builtin.Word, 2 // users: %10, %5
%5 = builtin "zextOrBitCast_Word_Int64"(%4 : $Builtin.Word) : $Builtin.Int64 // users: %8, %6
%6 = struct $Int (%5 : $Builtin.Int64) // users: %26, %13
%7 = integer_literal $Builtin.Int64, 0 // user: %8
%8 = builtin "cmp_slt_Int64"(%7 : $Builtin.Int64, %5 : $Builtin.Int64) : $Builtin.Int1 // user: %9
cond_br %8, bb1, bb3 // id: %9
bb1: // Preds: bb0
%10 = alloc_ref [tail_elems $Tensor1D<Double> * %4 : $Builtin.Word] $_ContiguousArrayStorage<Tensor1D<Double>> // user: %13
%11 = metatype $@thin Array<Tensor1D<Double>>.Type // user: %13
// function_ref static Array._adoptStorage(_:count:)
%12 = function_ref @$SSa13_adoptStorage_5countSayxG_SpyxGts016_ContiguousArrayB0CyxG_SitFZ : $@convention(method) <τ_0_0> (@owned _ContiguousArrayStorage<τ_0_0>, Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // user: %13
%13 = apply %12<Tensor1D<Double>>(%10, %6, %11) : $@convention(method) <τ_0_0> (@owned _ContiguousArrayStorage<τ_0_0>, Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // users: %15, %14
%14 = tuple_extract %13 : $(Array<Tensor1D<Double>>, UnsafeMutablePointer<Tensor1D<Double>>), 0 // user: %17
%15 = tuple_extract %13 : $(Array<Tensor1D<Double>>, UnsafeMutablePointer<Tensor1D<Double>>), 1 // user: %16
%16 = struct_extract %15 : $UnsafeMutablePointer<Tensor1D<Double>>, #UnsafeMutablePointer._rawValue // user: %17
br bb2(%14 : $Array<Tensor1D<Double>>, %16 : $Builtin.RawPointer) // id: %17
// %18 // users: %23, %20
// %19 // user: %20
bb2(%18 : $Array<Tensor1D<Double>>, %19 : $Builtin.RawPointer): // Preds: bb3 bb1
%20 = tuple (%18 : $Array<Tensor1D<Double>>, %19 : $Builtin.RawPointer) // users: %22, %21
%21 = tuple_extract %20 : $(Array<Tensor1D<Double>>, Builtin.RawPointer), 0
%22 = tuple_extract %20 : $(Array<Tensor1D<Double>>, Builtin.RawPointer), 1 // user: %23
br bb4(%18 : $Array<Tensor1D<Double>>, %22 : $Builtin.RawPointer) // id: %23
bb3: // Preds: bb0
%24 = metatype $@thin Array<Tensor1D<Double>>.Type // user: %26
// function_ref static Array._allocateUninitialized(_:)
%25 = function_ref @$SSa22_allocateUninitializedySayxG_SpyxGtSiFZ : $@convention(method) <τ_0_0> (Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // user: %26
%26 = apply %25<Tensor1D<Double>>(%6, %24) : $@convention(method) <τ_0_0> (Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // users: %28, %27
%27 = tuple_extract %26 : $(Array<Tensor1D<Double>>, UnsafeMutablePointer<Tensor1D<Double>>), 0 // user: %30
%28 = tuple_extract %26 : $(Array<Tensor1D<Double>>, UnsafeMutablePointer<Tensor1D<Double>>), 1 // user: %29
%29 = struct_extract %28 : $UnsafeMutablePointer<Tensor1D<Double>>, #UnsafeMutablePointer._rawValue // user: %30
br bb2(%27 : $Array<Tensor1D<Double>>, %29 : $Builtin.RawPointer) // id: %30
// %31 // users: %147, %33
// %32 // user: %33
bb4(%31 : $Array<Tensor1D<Double>>, %32 : $Builtin.RawPointer): // Preds: bb2
%33 = tuple (%31 : $Array<Tensor1D<Double>>, %32 : $Builtin.RawPointer) // users: %34, %42, %43
%34 = tuple_extract %33 : $(Array<Tensor1D<Double>>, Builtin.RawPointer), 0 // user: %35
%35 = struct_extract %34 : $Array<Tensor1D<Double>>, #Array._buffer // user: %36
%36 = struct_extract %35 : $_ArrayBuffer<Tensor1D<Double>>, #_ArrayBuffer._storage // user: %37
%37 = struct_extract %36 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // users: %39, %38
strong_retain %37 : $Builtin.BridgeObject // id: %38
%39 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%37 : $Builtin.BridgeObject) // user: %40
%40 = struct $_ArrayBuffer<Tensor1D<Double>> (%39 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %41
%41 = struct $Array<Tensor1D<Double>> (%40 : $_ArrayBuffer<Tensor1D<Double>>)
%42 = tuple_extract %33 : $(Array<Tensor1D<Double>>, Builtin.RawPointer), 1 // user: %48
%43 = tuple_extract %33 : $(Array<Tensor1D<Double>>, Builtin.RawPointer), 0 // user: %44
%44 = struct_extract %43 : $Array<Tensor1D<Double>>, #Array._buffer // user: %45
%45 = struct_extract %44 : $_ArrayBuffer<Tensor1D<Double>>, #_ArrayBuffer._storage // user: %46
%46 = struct_extract %45 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>, #_BridgeStorage.rawValue // user: %47
strong_release %46 : $Builtin.BridgeObject // id: %47
%48 = pointer_to_address %42 : $Builtin.RawPointer to [strict] $*Tensor1D<Double> // users: %96, %98
%49 = integer_literal $Builtin.Word, 2 // users: %55, %50
%50 = builtin "zextOrBitCast_Word_Int64"(%49 : $Builtin.Word) : $Builtin.Int64 // users: %53, %51
%51 = struct $Int (%50 : $Builtin.Int64) // users: %71, %58
%52 = integer_literal $Builtin.Int64, 0 // user: %53
%53 = builtin "cmp_slt_Int64"(%52 : $Builtin.Int64, %50 : $Builtin.Int64) : $Builtin.Int1 // user: %54
cond_br %53, bb5, bb7 // id: %54
bb5: // Preds: bb4
%55 = alloc_ref [tail_elems $Double * %49 : $Builtin.Word] $_ContiguousArrayStorage<Double> // user: %58
%56 = metatype $@thin Array<Double>.Type // user: %58
// function_ref static Array._adoptStorage(_:count:)
%57 = function_ref @$SSa13_adoptStorage_5countSayxG_SpyxGts016_ContiguousArrayB0CyxG_SitFZ : $@convention(method) <τ_0_0> (@owned _ContiguousArrayStorage<τ_0_0>, Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // user: %58
%58 = apply %57<Double>(%55, %51, %56) : $@convention(method) <τ_0_0> (@owned _ContiguousArrayStorage<τ_0_0>, Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // users: %60, %59
%59 = tuple_extract %58 : $(Array<Double>, UnsafeMutablePointer<Double>), 0 // user: %62
%60 = tuple_extract %58 : $(Array<Double>, UnsafeMutablePointer<Double>), 1 // user: %61
%61 = struct_extract %60 : $UnsafeMutablePointer<Double>, #UnsafeMutablePointer._rawValue // user: %62
br bb6(%59 : $Array<Double>, %61 : $Builtin.RawPointer) // id: %62
// %63 // users: %68, %65
// %64 // user: %65
bb6(%63 : $Array<Double>, %64 : $Builtin.RawPointer): // Preds: bb7 bb5
%65 = tuple (%63 : $Array<Double>, %64 : $Builtin.RawPointer) // users: %67, %66
%66 = tuple_extract %65 : $(Array<Double>, Builtin.RawPointer), 0
%67 = tuple_extract %65 : $(Array<Double>, Builtin.RawPointer), 1 // user: %68
br bb8(%63 : $Array<Double>, %67 : $Builtin.RawPointer) // id: %68
bb7: // Preds: bb4
%69 = metatype $@thin Array<Double>.Type // user: %71
// function_ref static Array._allocateUninitialized(_:)
%70 = function_ref @$SSa22_allocateUninitializedySayxG_SpyxGtSiFZ : $@convention(method) <τ_0_0> (Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // user: %71
%71 = apply %70<Double>(%51, %69) : $@convention(method) <τ_0_0> (Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // users: %73, %72
%72 = tuple_extract %71 : $(Array<Double>, UnsafeMutablePointer<Double>), 0 // user: %75
%73 = tuple_extract %71 : $(Array<Double>, UnsafeMutablePointer<Double>), 1 // user: %74
%74 = struct_extract %73 : $UnsafeMutablePointer<Double>, #UnsafeMutablePointer._rawValue // user: %75
br bb6(%72 : $Array<Double>, %74 : $Builtin.RawPointer) // id: %75
// %76 // users: %93, %78
// %77 // user: %78
bb8(%76 : $Array<Double>, %77 : $Builtin.RawPointer): // Preds: bb6
%78 = tuple (%76 : $Array<Double>, %77 : $Builtin.RawPointer) // users: %82, %79, %81
%79 = tuple_extract %78 : $(Array<Double>, Builtin.RawPointer), 0 // user: %80
retain_value %79 : $Array<Double> // id: %80
%81 = tuple_extract %78 : $(Array<Double>, Builtin.RawPointer), 1 // user: %83
release_value %78 : $(Array<Double>, Builtin.RawPointer) // id: %82
%83 = pointer_to_address %81 : $Builtin.RawPointer to [strict] $*Double // users: %86, %88
%84 = float_literal $Builtin.FPIEEE64, 0x3FF0000000000000 // 1 // user: %85
%85 = struct $Double (%84 : $Builtin.FPIEEE64) // user: %86
store %85 to %83 : $*Double // id: %86
%87 = integer_literal $Builtin.Word, 1 // user: %88
%88 = index_addr %83 : $*Double, %87 : $Builtin.Word // user: %91
%89 = float_literal $Builtin.FPIEEE64, 0x4000000000000000 // 2 // user: %90
%90 = struct $Double (%89 : $Builtin.FPIEEE64) // user: %91
store %90 to %88 : $*Double // id: %91
// function_ref __tf_tensor_from_scalars_1d
%92 = function_ref @__tf_tensor_from_scalars_1d : $@convention(thin) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>) -> @owned TensorHandle<τ_0_0> // user: %93
%93 = apply %92<Double>(%76) : $@convention(thin) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>) -> @owned TensorHandle<τ_0_0> // user: %94
%94 = struct $Tensor<Double> (%93 : $TensorHandle<Double>) // user: %95
%95 = struct $Tensor1D<Double> (%94 : $Tensor<Double>) // user: %96
store %95 to %48 : $*Tensor1D<Double> // id: %96
%97 = integer_literal $Builtin.Word, 1 // user: %98
%98 = index_addr %48 : $*Tensor1D<Double>, %97 : $Builtin.Word // user: %146
%99 = integer_literal $Builtin.Word, 2 // users: %105, %100
%100 = builtin "zextOrBitCast_Word_Int64"(%99 : $Builtin.Word) : $Builtin.Int64 // users: %103, %101
%101 = struct $Int (%100 : $Builtin.Int64) // users: %121, %108
%102 = integer_literal $Builtin.Int64, 0 // user: %103
%103 = builtin "cmp_slt_Int64"(%102 : $Builtin.Int64, %100 : $Builtin.Int64) : $Builtin.Int1 // user: %104
cond_br %103, bb9, bb11 // id: %104
bb9: // Preds: bb8
%105 = alloc_ref [tail_elems $Double * %99 : $Builtin.Word] $_ContiguousArrayStorage<Double> // user: %108
%106 = metatype $@thin Array<Double>.Type // user: %108
// function_ref static Array._adoptStorage(_:count:)
%107 = function_ref @$SSa13_adoptStorage_5countSayxG_SpyxGts016_ContiguousArrayB0CyxG_SitFZ : $@convention(method) <τ_0_0> (@owned _ContiguousArrayStorage<τ_0_0>, Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // user: %108
%108 = apply %107<Double>(%105, %101, %106) : $@convention(method) <τ_0_0> (@owned _ContiguousArrayStorage<τ_0_0>, Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // users: %110, %109
%109 = tuple_extract %108 : $(Array<Double>, UnsafeMutablePointer<Double>), 0 // user: %112
%110 = tuple_extract %108 : $(Array<Double>, UnsafeMutablePointer<Double>), 1 // user: %111
%111 = struct_extract %110 : $UnsafeMutablePointer<Double>, #UnsafeMutablePointer._rawValue // user: %112
br bb10(%109 : $Array<Double>, %111 : $Builtin.RawPointer) // id: %112
// %113 // users: %118, %115
// %114 // user: %115
bb10(%113 : $Array<Double>, %114 : $Builtin.RawPointer): // Preds: bb11 bb9
%115 = tuple (%113 : $Array<Double>, %114 : $Builtin.RawPointer) // users: %117, %116
%116 = tuple_extract %115 : $(Array<Double>, Builtin.RawPointer), 0
%117 = tuple_extract %115 : $(Array<Double>, Builtin.RawPointer), 1 // user: %118
br bb12(%113 : $Array<Double>, %117 : $Builtin.RawPointer) // id: %118
bb11: // Preds: bb8
%119 = metatype $@thin Array<Double>.Type // user: %121
// function_ref static Array._allocateUninitialized(_:)
%120 = function_ref @$SSa22_allocateUninitializedySayxG_SpyxGtSiFZ : $@convention(method) <τ_0_0> (Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // user: %121
%121 = apply %120<Double>(%101, %119) : $@convention(method) <τ_0_0> (Int, @thin Array<τ_0_0>.Type) -> (@owned Array<τ_0_0>, UnsafeMutablePointer<τ_0_0>) // users: %123, %122
%122 = tuple_extract %121 : $(Array<Double>, UnsafeMutablePointer<Double>), 0 // user: %125
%123 = tuple_extract %121 : $(Array<Double>, UnsafeMutablePointer<Double>), 1 // user: %124
%124 = struct_extract %123 : $UnsafeMutablePointer<Double>, #UnsafeMutablePointer._rawValue // user: %125
br bb10(%122 : $Array<Double>, %124 : $Builtin.RawPointer) // id: %125
// %126 // users: %143, %128
// %127 // user: %128
bb12(%126 : $Array<Double>, %127 : $Builtin.RawPointer): // Preds: bb10
%128 = tuple (%126 : $Array<Double>, %127 : $Builtin.RawPointer) // users: %132, %129, %131
%129 = tuple_extract %128 : $(Array<Double>, Builtin.RawPointer), 0 // user: %130
retain_value %129 : $Array<Double> // id: %130
%131 = tuple_extract %128 : $(Array<Double>, Builtin.RawPointer), 1 // user: %133
release_value %128 : $(Array<Double>, Builtin.RawPointer) // id: %132
%133 = pointer_to_address %131 : $Builtin.RawPointer to [strict] $*Double // users: %136, %138
%134 = float_literal $Builtin.FPIEEE64, 0x4008000000000000 // 3 // user: %135
%135 = struct $Double (%134 : $Builtin.FPIEEE64) // user: %136
store %135 to %133 : $*Double // id: %136
%137 = integer_literal $Builtin.Word, 1 // user: %138
%138 = index_addr %133 : $*Double, %137 : $Builtin.Word // user: %141
%139 = float_literal $Builtin.FPIEEE64, 0x4010000000000000 // 4 // user: %140
%140 = struct $Double (%139 : $Builtin.FPIEEE64) // user: %141
store %140 to %138 : $*Double // id: %141
// function_ref __tf_tensor_from_scalars_1d
%142 = function_ref @__tf_tensor_from_scalars_1d : $@convention(thin) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>) -> @owned TensorHandle<τ_0_0> // user: %143
%143 = apply %142<Double>(%126) : $@convention(thin) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>) -> @owned TensorHandle<τ_0_0> // user: %144
%144 = struct $Tensor<Double> (%143 : $TensorHandle<Double>) // user: %145
%145 = struct $Tensor1D<Double> (%144 : $Tensor<Double>) // user: %146
store %145 to %98 : $*Tensor1D<Double> // id: %146
%147 = builtin "__tfop_Pack,$in"(%31 : $Array<Tensor1D<Double>>) : $TensorHandle<Double> // users: %166, %164, %161, %161, %160, %159, %157, %154, %148
%148 = struct $Tensor<Double> (%147 : $TensorHandle<Double>) // user: %149
%149 = struct $Tensor2D<Double> (%148 : $Tensor<Double>) // user: %150
%150 = struct_extract %149 : $Tensor2D<Double>, #Tensor2D.base // users: %171, %156, %153
alloc_global @$S4test3dot10TensorFlow0C0VySdGvp // id: %151
%152 = global_addr @$S4test3dot10TensorFlow0C0VySdGvp : $*Tensor<Double> // user: %172
%153 = struct_extract %150 : $Tensor<Double>, #Tensor.handle // user: %155
strong_retain %147 : $TensorHandle<Double> // id: %154
%155 = struct $Tensor<Double> (%153 : $TensorHandle<Double>)
%156 = struct_extract %150 : $Tensor<Double>, #Tensor.handle // user: %158
strong_retain %147 : $TensorHandle<Double> // id: %157
%158 = struct $Tensor<Double> (%156 : $TensorHandle<Double>)
strong_retain %147 : $TensorHandle<Double> // id: %159
strong_retain %147 : $TensorHandle<Double> // id: %160
%161 = builtin "__tfop_MatMul,$in,$in"(%147 : $TensorHandle<Double>, %147 : $TensorHandle<Double>) : $TensorHandle<Double> // user: %162
%162 = struct $Tensor<Double> (%161 : $TensorHandle<Double>) // user: %172
%163 = tuple ()
strong_release %147 : $TensorHandle<Double> // id: %164
%165 = tuple ()
strong_release %147 : $TensorHandle<Double> // id: %166
// function_ref foo()
%167 = function_ref @$S4test3fooyyF : $@convention(thin) () -> () // user: %168
%168 = apply %167() : $@convention(thin) () -> ()
%169 = integer_literal $Builtin.Int32, 0 // user: %170
%170 = struct $Int32 (%169 : $Builtin.Int32) // user: %173
store %150 to %3 : $*Tensor<Double> // id: %171
store %162 to %152 : $*Tensor<Double> // id: %172
return %170 : $Int32 // id: %173
} // end sil function 'main'
----
--- TFDeabstraction Input: $S4test3fooyyF
// foo()
sil hidden @$S4test3fooyyF : $@convention(thin) () -> () {
bb0:
%0 = global_addr @$S4test3dot10TensorFlow0C0VySdGvp : $*Tensor<Double> // user: %10
%1 = integer_literal $Builtin.Word, 1 // user: %3
// function_ref _allocateUninitializedArray<A>(_:)
%2 = function_ref @$Ss27_allocateUninitializedArrayySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // user: %3
%3 = apply %2<Any>(%1) : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer) // users: %7, %4, %6
%4 = tuple_extract %3 : $(Array<Any>, Builtin.RawPointer), 0 // users: %18, %5
retain_value %4 : $Array<Any> // id: %5
%6 = tuple_extract %3 : $(Array<Any>, Builtin.RawPointer), 1 // user: %8
release_value %3 : $(Array<Any>, Builtin.RawPointer) // id: %7
%8 = pointer_to_address %6 : $Builtin.RawPointer to [strict] $*Any // user: %9
%9 = init_existential_addr %8 : $*Any, $Tensor<Double> // user: %12
%10 = load %0 : $*Tensor<Double> // users: %12, %11
retain_value %10 : $Tensor<Double> // id: %11
store %10 to %9 : $*Tensor<Double> // id: %12
// function_ref default argument 1 of print(_:separator:terminator:)
%13 = function_ref @$Ss5print_9separator10terminatoryypd_S2StFfA0_ : $@convention(thin) () -> @owned String // user: %14
%14 = apply %13() : $@convention(thin) () -> @owned String // user: %18
// function_ref default argument 2 of print(_:separator:terminator:)
%15 = function_ref @$Ss5print_9separator10terminatoryypd_S2StFfA1_ : $@convention(thin) () -> @owned String // user: %16
%16 = apply %15() : $@convention(thin) () -> @owned String // user: %18
// function_ref print(_:separator:terminator:)
%17 = function_ref @$Ss5print_9separator10terminatoryypd_S2StF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %18
%18 = apply %17(%4, %14, %16) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
%19 = tuple () // user: %20
return %19 : $() // id: %20
} // end sil function '$S4test3fooyyF'
----
---- INPUT FUNCTION main ----------
// main
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
alloc_global @$S4test1a10TensorFlow0B0VySdGvp // id: %2
%3 = global_addr @$S4test1a10TensorFlow0B0VySdGvp : $*Tensor<Double> // user: %92
%4 = integer_literal $Builtin.Word, 2 // user: %7
%5 = integer_literal $Builtin.Int64, 2 // users: %66, %6
%6 = struct $Int (%5 : $Builtin.Int64) // user: %12
%7 = alloc_ref [tail_elems $Tensor1D<Double> * %4 : $Builtin.Word] $_ContiguousArrayStorage<Tensor1D<Double>> // users: %21, %16, %9, %8
%8 = upcast %7 : $_ContiguousArrayStorage<Tensor1D<Double>> to $_ContiguousArrayStorageBase // users: %20, %14
strong_retain %7 : $_ContiguousArrayStorage<Tensor1D<Double>> // id: %9
%10 = integer_literal $Builtin.Int64, 4 // user: %11
%11 = struct $UInt (%10 : $Builtin.Int64) // user: %12
%12 = struct $_SwiftArrayBodyStorage (%6 : $Int, %11 : $UInt) // user: %13
%13 = struct $_ArrayBody (%12 : $_SwiftArrayBodyStorage) // user: %15
%14 = ref_element_addr %8 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %15
store %13 to %14 : $*_ArrayBody // id: %15
%16 = unchecked_ref_cast %7 : $_ContiguousArrayStorage<Tensor1D<Double>> to $Builtin.BridgeObject // users: %22, %23, %17
%17 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%16 : $Builtin.BridgeObject) // user: %18
%18 = struct $_ArrayBuffer<Tensor1D<Double>> (%17 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %19
%19 = struct $Array<Tensor1D<Double>> (%18 : $_ArrayBuffer<Tensor1D<Double>>) // user: %49
%20 = ref_tail_addr %8 : $_ContiguousArrayStorageBase, $Tensor1D<Double> // users: %34, %33
strong_release %7 : $_ContiguousArrayStorage<Tensor1D<Double>> // id: %21
strong_retain %16 : $Builtin.BridgeObject // id: %22
strong_release %16 : $Builtin.BridgeObject // id: %23
%24 = integer_literal $Builtin.Word, 1 // users: %63, %34
// function_ref __tf_tensor_from_scalars_1d
%25 = function_ref @__tf_tensor_from_scalars_1d : $@convention(thin) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>) -> @owned TensorHandle<τ_0_0> // user: %45
%26 = metatype $@thin Double.Type // users: %30, %30, %30
%27 = float_literal $Builtin.FPIEEE64, 0x3FF0000000000000 // 1 // user: %30
%28 = float_literal $Builtin.FPIEEE64, 0x4000000000000000 // 2 // user: %30
%29 = integer_literal $Builtin.Int64, 2 // user: %30
%30 = builtin "__tfop_Const,value$tensor,$elt,$elt,shape$shape,$elt,dtype"(%26 : $@thin Double.Type, %27 : $Builtin.FPIEEE64, %28 : $Builtin.FPIEEE64, %26 : $@thin Double.Type, %29 : $Builtin.Int64, %26 : $@thin Double.Type) : $TensorHandle<Double> // user: %31
%31 = struct $Tensor<Double> (%30 : $TensorHandle<Double>) // user: %32
%32 = struct $Tensor1D<Double> (%31 : $Tensor<Double>) // user: %33
store %32 to %20 : $*Tensor1D<Double> // id: %33
%34 = index_addr %20 : $*Tensor1D<Double>, %24 : $Builtin.Word // user: %48
%35 = global_value @mainTv0_ : $_ContiguousArrayStorage<Double> // users: %42, %38, %37, %36
strong_retain %35 : $_ContiguousArrayStorage<Double> // id: %36
strong_retain %35 : $_ContiguousArrayStorage<Double> // id: %37
%38 = unchecked_ref_cast %35 : $_ContiguousArrayStorage<Double> to $Builtin.BridgeObject // users: %43, %44, %39
%39 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%38 : $Builtin.BridgeObject) // user: %40
%40 = struct $_ArrayBuffer<Double> (%39 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %41
%41 = struct $Array<Double> (%40 : $_ArrayBuffer<Double>) // user: %45
strong_release %35 : $_ContiguousArrayStorage<Double> // id: %42
strong_retain %38 : $Builtin.BridgeObject // id: %43
strong_release %38 : $Builtin.BridgeObject // id: %44
%45 = apply %25<Double>(%41) : $@convention(thin) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>) -> @owned TensorHandle<τ_0_0> // user: %46
%46 = struct $Tensor<Double> (%45 : $TensorHandle<Double>) // user: %47
%47 = struct $Tensor1D<Double> (%46 : $Tensor<Double>) // user: %48
store %47 to %34 : $*Tensor1D<Double> // id: %48
%49 = builtin "__tfop_Pack,$in"(%19 : $Array<Tensor1D<Double>>) : $TensorHandle<Double> // users: %60, %59, %57, %57, %56, %55, %54, %53, %50
%50 = struct $Tensor<Double> (%49 : $TensorHandle<Double>) // user: %92
alloc_global @$S4test3dot10TensorFlow0C0VySdGvp // id: %51
%52 = global_addr @$S4test3dot10TensorFlow0C0VySdGvp : $*Tensor<Double> // users: %80, %93
strong_retain %49 : $TensorHandle<Double> // id: %53
strong_retain %49 : $TensorHandle<Double> // id: %54
strong_retain %49 : $TensorHandle<Double> // id: %55
strong_retain %49 : $TensorHandle<Double> // id: %56
%57 = builtin "__tfop_MatMul,$in,$in"(%49 : $TensorHandle<Double>, %49 : $TensorHandle<Double>) : $TensorHandle<Double> // user: %58
%58 = struct $Tensor<Double> (%57 : $TensorHandle<Double>) // user: %93
strong_release %49 : $TensorHandle<Double> // id: %59
strong_release %49 : $TensorHandle<Double> // id: %60
%61 = integer_literal $Builtin.Int64, 1 // user: %62
%62 = struct $Int (%61 : $Builtin.Int64) // user: %67
%63 = alloc_ref [tail_elems $Any * %24 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %76, %71, %65, %64
%64 = upcast %63 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %75, %69
strong_retain %63 : $_ContiguousArrayStorage<Any> // id: %65
%66 = struct $UInt (%5 : $Builtin.Int64) // user: %67
%67 = struct $_SwiftArrayBodyStorage (%62 : $Int, %66 : $UInt) // user: %68
%68 = struct $_ArrayBody (%67 : $_SwiftArrayBodyStorage) // user: %70
%69 = ref_element_addr %64 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %70
store %68 to %69 : $*_ArrayBody // id: %70
%71 = unchecked_ref_cast %63 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // users: %77, %78, %72
%72 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%71 : $Builtin.BridgeObject) // user: %73
%73 = struct $_ArrayBuffer<Any> (%72 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %74
%74 = struct $Array<Any> (%73 : $_ArrayBuffer<Any>) // user: %89
%75 = ref_tail_addr %64 : $_ContiguousArrayStorageBase, $Any // user: %79
strong_release %63 : $_ContiguousArrayStorage<Any> // id: %76
strong_retain %71 : $Builtin.BridgeObject // id: %77
strong_release %71 : $Builtin.BridgeObject // id: %78
%79 = init_existential_addr %75 : $*Any, $Tensor<Double> // user: %83
%80 = load %52 : $*Tensor<Double> // users: %83, %81
%81 = struct_extract %80 : $Tensor<Double>, #Tensor.handle // user: %82
strong_retain %81 : $TensorHandle<Double> // id: %82
store %80 to %79 : $*Tensor<Double> // id: %83
// function_ref default argument 1 of print(_:separator:terminator:)
%84 = function_ref @$Ss5print_9separator10terminatoryypd_S2StFfA0_ : $@convention(thin) () -> @owned String // user: %85
%85 = apply %84() : $@convention(thin) () -> @owned String // user: %89
// function_ref default argument 2 of print(_:separator:terminator:)
%86 = function_ref @$Ss5print_9separator10terminatoryypd_S2StFfA1_ : $@convention(thin) () -> @owned String // user: %87
%87 = apply %86() : $@convention(thin) () -> @owned String // user: %89
// function_ref print(_:separator:terminator:)
%88 = function_ref @$Ss5print_9separator10terminatoryypd_S2StF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %89
%89 = apply %88(%74, %85, %87) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
%90 = integer_literal $Builtin.Int32, 0 // user: %91
%91 = struct $Int32 (%90 : $Builtin.Int32) // user: %94
store %50 to %3 : $*Tensor<Double> // id: %92
store %58 to %52 : $*Tensor<Double> // id: %93
return %91 : $Int32 // id: %94
} // end sil function 'main'
---- END OF INPUT FUNCTION ----------
--- TFPartition Accelerator Result: main.tf_partition
// main.tf_partition
sil private @main.tf_partition : $@callee_owned () -> (TensorHandle<Double>, TensorHandle<Double>) {
bb0:
%0 = metatype $@thin Double.Type // user: %6
%1 = float_literal $Builtin.FPIEEE64, 0x3FF0000000000000 // 1 // user: %6
%2 = float_literal $Builtin.FPIEEE64, 0x4000000000000000 // 2 // user: %6
%3 = metatype $@thin Double.Type // user: %6
%4 = integer_literal $Builtin.Int64, 2 // user: %6
%5 = metatype $@thin Double.Type // user: %6
%6 = builtin "__tfop_Const,value$tensor,$elt,$elt,shape$shape,$elt,dtype"(%0 : $@thin Double.Type, %1 : $Builtin.FPIEEE64, %2 : $Builtin.FPIEEE64, %3 : $@thin Double.Type, %4 : $Builtin.Int64, %5 : $@thin Double.Type) : $TensorHandle<Double> // user: %15
%7 = metatype $@thin Double.Type // user: %13
%8 = float_literal $Builtin.FPIEEE64, 0x4008000000000000 // 3 // user: %13
%9 = float_literal $Builtin.FPIEEE64, 0x4010000000000000 // 4 // user: %13
%10 = metatype $@thin Double.Type // user: %13
%11 = integer_literal $Builtin.Int64, 2 // user: %13
%12 = metatype $@thin Double.Type // user: %13
%13 = builtin "__tfop_Const,value$tensor,$elt,$elt,shape$shape,$elt,dtype"(%7 : $@thin Double.Type, %8 : $Builtin.FPIEEE64, %9 : $Builtin.FPIEEE64, %10 : $@thin Double.Type, %11 : $Builtin.Int64, %12 : $@thin Double.Type) : $TensorHandle<Double> // user: %15
%14 = metatype $@thin Tensor1D<Double>.Type // user: %15
%15 = builtin "__tfop_Pack,$in,$inelt,$inelt"(%14 : $@thin Tensor1D<Double>.Type, %6 : $TensorHandle<Double>, %13 : $TensorHandle<Double>) : $TensorHandle<Double> // users: %17, %16, %16
%16 = builtin "__tfop_MatMul,$in,$in"(%15 : $TensorHandle<Double>, %15 : $TensorHandle<Double>) : $TensorHandle<Double> // user: %17
%17 = tuple (%15 : $TensorHandle<Double>, %16 : $TensorHandle<Double>) // user: %18
return %17 : $(TensorHandle<Double>, TensorHandle<Double>) // id: %18
} // end sil function 'main.tf_partition'
----
--- XLA CFG Canonicalize: main.tf_partition
block bb0
--- XLA CFG Canonicalize end
--- TFPartition Host Result: main
// main
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
alloc_global @$S4test1a10TensorFlow0B0VySdGvp // id: %2
%3 = global_addr @$S4test1a10TensorFlow0B0VySdGvp : $*Tensor<Double> // user: %89
%4 = integer_literal $Builtin.Word, 2
%5 = integer_literal $Builtin.Int64, 2 // users: %63, %6
%6 = struct $Int (%5 : $Builtin.Int64) // user: %9
%7 = integer_literal $Builtin.Int64, 4 // user: %8
%8 = struct $UInt (%7 : $Builtin.Int64) // user: %9
%9 = struct $_SwiftArrayBodyStorage (%6 : $Int, %8 : $UInt) // user: %10
%10 = struct $_ArrayBody (%9 : $_SwiftArrayBodyStorage)
%11 = integer_literal $Builtin.Word, 1 // user: %60
// function_ref __tf_tensor_from_scalars_1d
%12 = function_ref @__tf_tensor_from_scalars_1d : $@convention(thin) <τ_0_0 where τ_0_0 : AccelerableByTensorFlow> (@owned Array<τ_0_0>) -> @owned TensorHandle<τ_0_0>
%13 = string_literal bytes "0A2F0A1A7466635F66756E635F6D61696E2E74665F706172746974696F6E12116D61696E2E74665F706172746974696F6E0A4F0A1E7466635F6F75747075745F305F6D61696E2E74665F706172746974696F6E12084964656E746974791A1A7466635F66756E635F6D61696E2E74665F706172746974696F6E2A070A0154120230020A510A1E7466635F6F75747075745F315F6D61696E2E74665F706172746974696F6E12084964656E746974791A1C7466635F66756E635F6D61696E2E74665F706172746974696F6E3A312A070A01541202300212CD040ACA040A430A116D61696E2E74665F706172746974696F6E1A160A126F705F746573745F73776966745F335F313618021A160A126F705F746573745F73776966745F345F313318021A4F0A126F702E746573742E73776966742E332E31371205436F6E73742A250A0576616C7565121C421A08021204120208022210000000000000F03F00000000000000402A0B0A056474797065120230021A4F0A126F702E746573742E73776966742E332E32391205436F6E73742A250A0576616C7565121C421A08021204120208022210000000000000084000000000000010402A0B0A056474797065120230021A720A126F702E746573742E73776966742E332E313612045061636B1A1B6F702E746573742E73776966742E332E31373A6F75747075743A301A1B6F702E746573742E73776966742E332E32393A6F75747075743A302A070A0154120230022A0A0A0461786973120218002A070A014E120218021A85010A126F702E746573742E73776966742E342E313312064D61744D756C1A1B6F702E746573742E73776966742E332E31363A6F75747075743A301A1B6F702E746573742E73776966742E332E31363A6F75747075743A302A070A0154120230022A110A0B7472616E73706F73655F61120228002A110A0B7472616E73706F73655F621202280022310A126F705F746573745F73776966745F335F3136121B6F702E746573742E73776966742E332E31363A6F75747075743A3022320A126F705F746573745F73776966745F345F3133121C6F702E746573742E73776966742E342E31333A70726F647563743A302204081A100C" // user: %16
%14 = integer_literal $Builtin.Int64, 811 // user: %18
%15 = string_literal utf8 "main.tf_partition" // user: %17
%16 = struct $UnsafeRawPointer (%13 : $Builtin.RawPointer) // user: %28
%17 = struct $UnsafePointer<Int8> (%15 : $Builtin.RawPointer) // user: %28
%18 = struct $Int (%14 : $Builtin.Int64) // user: %28
%19 = alloc_stack $OpaquePointer // users: %30, %20
%20 = begin_access [read] [static] %19 : $*OpaquePointer // users: %29, %21
%21 = address_to_pointer %20 : $*OpaquePointer to $Builtin.RawPointer // user: %22
%22 = struct $UnsafePointer<OpaquePointer> (%21 : $Builtin.RawPointer) // user: %28
%23 = integer_literal $Builtin.Int64, 0 // user: %24
%24 = struct $Int (%23 : $Builtin.Int64) // user: %28
%25 = integer_literal $Builtin.Int64, 2 // user: %26
%26 = struct $Int (%25 : $Builtin.Int64) // users: %39, %28
// function_ref _swift_tfc_StartTensorComputation
%27 = function_ref @_swift_tfc_StartTensorComputation : $@convention(thin) (UnsafeRawPointer, Int, UnsafePointer<Int8>, UnsafePointer<OpaquePointer>, Int, Int) -> @owned _TensorComputation // user: %28
%28 = apply %27(%16, %18, %17, %22, %24, %26) : $@convention(thin) (UnsafeRawPointer, Int, UnsafePointer<Int8>, UnsafePointer<OpaquePointer>, Int, Int) -> @owned _TensorComputation // user: %39
end_access %20 : $*OpaquePointer // id: %29
dealloc_stack %19 : $*OpaquePointer // id: %30
alloc_global @$S4test3dot10TensorFlow0C0VySdGvp // id: %31
%32 = global_addr @$S4test3dot10TensorFlow0C0VySdGvp : $*Tensor<Double> // users: %77, %90
%33 = alloc_stack $(OpaquePointer, OpaquePointer) // users: %53, %48, %41, %34
%34 = begin_access [modify] [static] %33 : $*(OpaquePointer, OpaquePointer) // users: %40, %35
%35 = tuple_element_addr %34 : $*(OpaquePointer, OpaquePointer), 0 // user: %36
%36 = address_to_pointer %35 : $*OpaquePointer to $Builtin.RawPointer // user: %37
%37 = struct $UnsafeMutablePointer<OpaquePointer> (%36 : $Builtin.RawPointer) // user: %39
// function_ref _swift_tfc_FinishTensorComputation
%38 = function_ref @_swift_tfc_FinishTensorComputation : $@convention(thin) (@owned _TensorComputation, UnsafeMutablePointer<OpaquePointer>, Int) -> () // user: %39
%39 = apply %38(%28, %37, %26) : $@convention(thin) (@owned _TensorComputation, UnsafeMutablePointer<OpaquePointer>, Int) -> ()
end_access %34 : $*(OpaquePointer, OpaquePointer) // id: %40
%41 = tuple_element_addr %33 : $*(OpaquePointer, OpaquePointer), 0 // user: %42
%42 = load %41 : $*OpaquePointer // user: %45
%43 = alloc_ref $TensorHandle<Double> // users: %57, %56, %54, %47, %46, %44
%44 = ref_element_addr %43 : $TensorHandle<Double>, #TensorHandle.cTensorHandle // user: %45
store %42 to %44 : $*OpaquePointer // id: %45
strong_retain %43 : $TensorHandle<Double> // id: %46
strong_retain %43 : $TensorHandle<Double> // id: %47
%48 = tuple_element_addr %33 : $*(OpaquePointer, OpaquePointer), 1 // user: %49
%49 = load %48 : $*OpaquePointer // user: %52
%50 = alloc_ref $TensorHandle<Double> // users: %55, %51
%51 = ref_element_addr %50 : $TensorHandle<Double>, #TensorHandle.cTensorHandle // user: %52
store %49 to %51 : $*OpaquePointer // id: %52
dealloc_stack %33 : $*(OpaquePointer, OpaquePointer) // id: %53
%54 = struct $Tensor<Double> (%43 : $TensorHandle<Double>) // user: %89
%55 = struct $Tensor<Double> (%50 : $TensorHandle<Double>) // user: %90
strong_release %43 : $TensorHandle<Double> // id: %56
strong_release %43 : $TensorHandle<Double> // id: %57
%58 = integer_literal $Builtin.Int64, 1 // user: %59
%59 = struct $Int (%58 : $Builtin.Int64) // user: %64
%60 = alloc_ref [tail_elems $Any * %11 : $Builtin.Word] $_ContiguousArrayStorage<Any> // users: %73, %68, %62, %61
%61 = upcast %60 : $_ContiguousArrayStorage<Any> to $_ContiguousArrayStorageBase // users: %72, %66
strong_retain %60 : $_ContiguousArrayStorage<Any> // id: %62
%63 = struct $UInt (%5 : $Builtin.Int64) // user: %64
%64 = struct $_SwiftArrayBodyStorage (%59 : $Int, %63 : $UInt) // user: %65
%65 = struct $_ArrayBody (%64 : $_SwiftArrayBodyStorage) // user: %67
%66 = ref_element_addr %61 : $_ContiguousArrayStorageBase, #_ContiguousArrayStorageBase.countAndCapacity // user: %67
store %65 to %66 : $*_ArrayBody // id: %67
%68 = unchecked_ref_cast %60 : $_ContiguousArrayStorage<Any> to $Builtin.BridgeObject // users: %74, %75, %69
%69 = struct $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore> (%68 : $Builtin.BridgeObject) // user: %70
%70 = struct $_ArrayBuffer<Any> (%69 : $_BridgeStorage<_ContiguousArrayStorageBase, _NSArrayCore>) // user: %71
%71 = struct $Array<Any> (%70 : $_ArrayBuffer<Any>) // user: %86
%72 = ref_tail_addr %61 : $_ContiguousArrayStorageBase, $Any // user: %76
strong_release %60 : $_ContiguousArrayStorage<Any> // id: %73
strong_retain %68 : $Builtin.BridgeObject // id: %74
strong_release %68 : $Builtin.BridgeObject // id: %75
%76 = init_existential_addr %72 : $*Any, $Tensor<Double> // user: %80
%77 = load %32 : $*Tensor<Double> // users: %80, %78
%78 = struct_extract %77 : $Tensor<Double>, #Tensor.handle // user: %79
strong_retain %78 : $TensorHandle<Double> // id: %79
store %77 to %76 : $*Tensor<Double> // id: %80
// function_ref default argument 1 of print(_:separator:terminator:)
%81 = function_ref @$Ss5print_9separator10terminatoryypd_S2StFfA0_ : $@convention(thin) () -> @owned String // user: %82
%82 = apply %81() : $@convention(thin) () -> @owned String // user: %86
// function_ref default argument 2 of print(_:separator:terminator:)
%83 = function_ref @$Ss5print_9separator10terminatoryypd_S2StFfA1_ : $@convention(thin) () -> @owned String // user: %84
%84 = apply %83() : $@convention(thin) () -> @owned String // user: %86
// function_ref print(_:separator:terminator:)
%85 = function_ref @$Ss5print_9separator10terminatoryypd_S2StF : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> () // user: %86
%86 = apply %85(%71, %82, %84) : $@convention(thin) (@owned Array<Any>, @owned String, @owned String) -> ()
%87 = integer_literal $Builtin.Int32, 0 // user: %88
%88 = struct $Int32 (%87 : $Builtin.Int32) // user: %91
store %54 to %3 : $*Tensor<Double> // id: %89
store %55 to %32 : $*Tensor<Double> // id: %90
return %88 : $Int32 // id: %91
} // end sil function 'main'
from swift.
https://bugs.swift.org/browse/SR-7683
from swift.
Related Issues (20)
- Close all open issues and pull requests since this repository has been moved
- Python linking in xcode HOT 5
- Internal error when `public`s are removed from the catch model HOT 3
- Configuring swift-format's line breaking rule
- Add build instructions to Readme
- Error building swift-format HOT 1
- Translation of Google Swift Style Guide
- Unexpected newline before opening brace for method calls with trailing closures
- The rule NoAccessLevelOnExtensionDeclaration doesn't work
- testEagerLoop() in crashers.swift crashers in TFLowerGraph.cpp, after supporting TF tensor receives HOT 1
- Use SILPrinter callback mechanism to annotate the printed SIL code HOT 2
- Bridge Python `numpy.ndarray` to `Array` and `Tensor` HOT 2
- Crash when doing basic Swift's String Interpolation. HOT 10
- [Ubuntu] `Python.import("numpy")` fails in the REPL HOT 5
- Non-data dependent code with side effects - should they sync? HOT 8
- Implement UseOnlySpaces HOT 1
- Implement UseTripleSlashForDocumentationComments HOT 1
- implement NeverUseForceTry HOT 1
- Implement NeverUseImplicitlyUnwrappedOptionals HOT 1
- Implement CyclomaticComplexityWarning.swift HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift.