Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/SIL/SILFunctionBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ void SILFunctionBuilder::addFunctionAttributes(SILFunction *F,
vjpName = SILDeclRef(vjpFn).mangle();
// Get lowered argument indices.
auto paramIndices = A->getParameterIndices();
if (!paramIndices)
continue;
auto loweredParamIndices = paramIndices->getLowered(
F->getASTContext(),
decl->getInterfaceType()->castTo<AnyFunctionType>());
Expand Down
15 changes: 8 additions & 7 deletions stdlib/public/TensorFlow/TensorHandle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ internal extension TensorHandle {
}
}

internal extension ShapedArray where Scalar : _TensorFlowDataTypeCompatible {
@usableFromInline
@inline(never)
public extension ShapedArray where Scalar : _TensorFlowDataTypeCompatible {
@inlinable
init(cTensorHandle: CTensorHandle) {
internalConsistencyCheck(TFE_TensorHandleIsConcrete(cTensorHandle) != 0)
let status = TF_NewStatus()
Expand All @@ -162,10 +161,11 @@ internal extension ShapedArray where Scalar : _TensorFlowDataTypeCompatible {
/// `ResourceHandle` is the type used by ops to represent TensorFlow "resource"
/// values.
public struct ResourceHandle {
@usableFromInline
let handle: _AnyTensorHandle

@usableFromInline
var _cTensorHandle: CTensorHandle { handle._cTensorHandle }
@inlinable
public var _cTensorHandle: CTensorHandle { handle._cTensorHandle }

@usableFromInline
init(owning cTensorHandle: CTensorHandle) {
Expand All @@ -176,10 +176,11 @@ public struct ResourceHandle {
/// `VariantHandle` is the type used by ops to represent TensorFlow "variant"
/// values.
public struct VariantHandle {
@usableFromInline
let handle: _AnyTensorHandle

@usableFromInline
var _cTensorHandle: CTensorHandle { handle._cTensorHandle }
@inlinable
public var _cTensorHandle: CTensorHandle { handle._cTensorHandle }

@usableFromInline
init(owning cTensorHandle: CTensorHandle) {
Expand Down