Skip to content

Commit 19c8d02

Browse files
bgogulrxwei
authored andcommitted
Fix some of the style issues from #23868 (#24001)
1 parent 9a9822e commit 19c8d02

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

stdlib/public/TensorFlow/CompilerRuntime.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ private class TraceContext {
219219
/// Execute the trace graph function, and return the list of output tensors
220220
/// from the trace execution. These output tensors are owned by the caller.
221221
func execute(
222-
traceeInputs: [_AnyTensorHandle], useXla: Bool = false) -> [CTensorHandle] {
222+
traceeInputs: [_AnyTensorHandle], useXLA: Bool = false) -> [CTensorHandle] {
223223
// We must be in the `notTracing` enum mode.
224224
internalConsistencyCheck(_RuntimeConfig.traceState.context == nil)
225225
internalConsistencyCheck(traceGraphFn != nil)
@@ -237,7 +237,7 @@ private class TraceContext {
237237
checkOk(status)
238238
}
239239

240-
if useXla {
240+
if useXLA {
241241
debugLog("Enabling XLA compilation")
242242
TFE_OpSetAttrBool(op, "_XlaCompile", 1)
243243
}
@@ -1002,11 +1002,10 @@ public func _tffunc<State : _TensorArrayProtocolEnhanced,
10021002
// Trace the given function to generate a TF graph and return a closure
10031003
// that can be used to launch the graph.
10041004
public func _graph<In : TensorGroup, Out : TensorGroup>(
1005-
_ fn: (In) -> Out, useXla: Bool = false
1005+
_ fn: (In) -> Out, useXLA: Bool = false
10061006
) -> (In) -> Out {
10071007
let traceContext: TraceContext = withoutActuallyEscaping(fn) { escapableFn in
1008-
let wrappedFn = {
1009-
(inputs: [CTensorHandle]) -> [CTensorHandle] in
1008+
let wrappedFn = { (inputs: [CTensorHandle]) -> [CTensorHandle] in
10101009
let buffer = UnsafeMutablePointer<CTensorHandle>.allocate(
10111010
capacity: Int(inputs.count))
10121011
var ptr = buffer
@@ -1033,7 +1032,7 @@ public func _graph<In : TensorGroup, Out : TensorGroup>(
10331032
}
10341033
debugLog("Executing trace graph function.")
10351034
let returnValues = traceContext.execute(
1036-
traceeInputs: inputTensors, useXla: useXla)
1035+
traceeInputs: inputTensors, useXLA: useXLA)
10371036

10381037
debugLog("Creating output model instance.")
10391038
return Out(_copying: returnValues)

0 commit comments

Comments
 (0)