Skip to content

Commit ef21eaf

Browse files
pschuhrxwei
authored andcommitted
Disable @convention(tensorflow) and @TensorFlowGraph attributes. (#24381)
These are not getting used in the library anywhere and are just unused compiler features.
1 parent f7c6b52 commit ef21eaf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+50
-233
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2791,6 +2791,8 @@ ERROR(compiler_evaluable_ref_non_compiler_evaluable,none,
27912791
// @TensorFlowGraph attribute
27922792
ERROR(tf_graph_attr_top_level_only,none,
27932793
"@TensorFlowGraph can only be applied to top-level functions", ())
2794+
ERROR(tf_graph_deprecated_please_remove,none,
2795+
"@TensorFlowGraph has no effect and is deprecated. Please remove.", ())
27942796
ERROR(tf_graph_attr_function_tensorflow_value_only,none,
27952797
"@TensorFlowGraph can only be applied to functions whose parameters and "
27962798
"return values are TensorFlow values or aggregates of TensorFlow "

include/swift/AST/Types.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,12 +2625,8 @@ enum class FunctionTypeRepresentation : uint8_t {
26252625
/// convention.
26262626
CFunctionPointer,
26272627

2628-
// SWIFT_ENABLE_TENSORFLOW
2629-
/// A function that will be promoted to a TensorFlow Graph.
2630-
TensorFlow,
2631-
26322628
/// The value of the greatest AST function representation.
2633-
Last = TensorFlow,
2629+
Last = CFunctionPointer,
26342630
};
26352631

26362632
/// The representation form of a SIL function.
@@ -2656,12 +2652,8 @@ enum class SILFunctionTypeRepresentation : uint8_t {
26562652
/// convention.
26572653
CFunctionPointer = uint8_t(FunctionTypeRepresentation::CFunctionPointer),
26582654

2659-
// SWIFT_ENABLE_TENSORFLOW
2660-
/// A TensorFlow function pointer.
2661-
TensorFlow = uint8_t(FunctionTypeRepresentation::TensorFlow),
2662-
26632655
/// The value of the greatest AST function representation.
2664-
LastAST = TensorFlow,
2656+
LastAST = CFunctionPointer,
26652657

26662658
/// The value of the least SIL-only function representation.
26672659
FirstSIL = 8,
@@ -2677,6 +2669,10 @@ enum class SILFunctionTypeRepresentation : uint8_t {
26772669

26782670
/// A closure invocation function that has not been bound to a context.
26792671
Closure,
2672+
2673+
// SWIFT_ENABLE_TENSORFLOW
2674+
/// A TensorFlow function pointer.
2675+
TensorFlow,
26802676
};
26812677

26822678
/// Can this calling convention result in a function being called indirectly

lib/AST/ASTMangler.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,9 +1745,6 @@ void ASTMangler::appendFunctionType(AnyFunctionType *fn, bool isAutoClosure) {
17451745
case AnyFunctionType::Representation::Thin:
17461746
return appendOperator("Xf");
17471747
case AnyFunctionType::Representation::Swift:
1748-
// SWIFT_ENABLE_TENSORFLOW
1749-
case AnyFunctionType::Representation::TensorFlow:
1750-
17511748
if (isAutoClosure) {
17521749
if (fn->isNoEscape())
17531750
return appendOperator("XK");

lib/AST/Type.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,8 +1890,6 @@ getForeignRepresentable(Type type, ForeignLanguage language,
18901890
// Check the representation of the function type.
18911891
bool isBlock = false;
18921892
switch (functionType->getRepresentation()) {
1893-
// SWIFT_ENABLE_TENSORFLOW
1894-
case AnyFunctionType::Representation::TensorFlow:
18951893
case AnyFunctionType::Representation::Thin:
18961894
return failure();
18971895

lib/IRGen/MetadataRequest.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,8 +1034,6 @@ namespace {
10341034
metadataConvention = FunctionMetadataConvention::Swift;
10351035
isEscaping = !type->isNoEscape();
10361036
break;
1037-
// SWIFT_ENABLE_TENSORFLOW
1038-
case FunctionTypeRepresentation::TensorFlow:
10391037
case FunctionTypeRepresentation::Thin:
10401038
metadataConvention = FunctionMetadataConvention::Thin;
10411039
break;

lib/PrintAsObjC/PrintAsObjC.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,8 +1143,6 @@ class ObjCPrinter : private DeclVisitor<ObjCPrinter>,
11431143
break;
11441144
case FunctionTypeRepresentation::Thin:
11451145
case FunctionTypeRepresentation::CFunctionPointer:
1146-
// SWIFT_ENABLE_TENSORFLOW
1147-
case FunctionTypeRepresentation::TensorFlow:
11481146
break;
11491147
}
11501148
} else if (isObjCReferenceCountableObjectType(copyTy)) {
@@ -1889,8 +1887,6 @@ class ObjCPrinter : private DeclVisitor<ObjCPrinter>,
18891887
void visitFunctionType(FunctionType *FT,
18901888
Optional<OptionalTypeKind> optionalKind) {
18911889
switch (FT->getRepresentation()) {
1892-
// SWIFT_ENABLE_TENSORFLOW
1893-
case AnyFunctionType::Representation::TensorFlow:
18941890
case AnyFunctionType::Representation::Thin:
18951891
llvm_unreachable("can't represent thin functions in ObjC");
18961892
// Native Swift function types bridge to block types.

lib/SIL/SILFunctionType.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,13 +2289,6 @@ TypeConverter::getDeclRefRepresentation(SILDeclRef c) {
22892289
case SILDeclRef::Kind::Func:
22902290
if (c.getDecl()->getDeclContext()->isTypeContext())
22912291
return SILFunctionTypeRepresentation::Method;
2292-
// SWIFT_ENABLE_TENSORFLOW
2293-
if (auto *FD = dyn_cast<FuncDecl>(c.getDecl())) {
2294-
auto *fnTy = FD->getInterfaceType()->castTo<AnyFunctionType>();
2295-
if (fnTy->getExtInfo().getRepresentation() ==
2296-
AnyFunctionType::Representation::TensorFlow)
2297-
return SILFunctionTypeRepresentation::TensorFlow;
2298-
}
22992292
return SILFunctionTypeRepresentation::Thin;
23002293

23012294
case SILDeclRef::Kind::Destroyer:

lib/SIL/TypeLowering.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,6 @@ namespace {
237237
// is @differentiable?
238238
return asImpl().handleReference(type);
239239

240-
// SWIFT_ENABLE_TENSORFLOW
241-
case AnyFunctionType::Representation::TensorFlow:
242240
case AnyFunctionType::Representation::CFunctionPointer:
243241
case AnyFunctionType::Representation::Thin:
244242
return asImpl().handleTrivial(type);

lib/SILGen/SILGenApply.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ getIndirectApplyAbstractionPattern(SILGenFunction &SGF,
6868
switch (fnType->getRepresentation()) {
6969
case FunctionTypeRepresentation::Swift:
7070
case FunctionTypeRepresentation::Thin:
71-
// SWIFT_ENABLE_TENSORFLOW
72-
case FunctionTypeRepresentation::TensorFlow:
7371
return pattern;
7472

7573
case FunctionTypeRepresentation::CFunctionPointer:

lib/SILGen/SILGenExpr.cpp

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ static ManagedValue convertFunctionRepresentation(SILGenFunction &SGF,
15991599
resultTy);
16001600
case SILFunctionType::Representation::Block:
16011601
llvm_unreachable("should not try block-to-block repr change");
1602-
// SWIFT_ENABLE_TENSORFLOW
1602+
// SWIFT_ENABLE_TENSORFLOW
16031603
case SILFunctionType::Representation::TensorFlow:
16041604
case SILFunctionType::Representation::Method:
16051605
case SILFunctionType::Representation::Closure:
@@ -1614,9 +1614,6 @@ static ManagedValue convertFunctionRepresentation(SILGenFunction &SGF,
16141614
llvm_unreachable("should not do function conversion to thin");
16151615
case AnyFunctionType::Representation::CFunctionPointer:
16161616
llvm_unreachable("should not do C function pointer conversion here");
1617-
// SWIFT_ENABLE_TENSORFLOW
1618-
case AnyFunctionType::Representation::TensorFlow:
1619-
llvm_unreachable("should not do function conversion to TensorFlow");
16201617
}
16211618
llvm_unreachable("bad representation");
16221619
}
@@ -1694,8 +1691,6 @@ RValue RValueEmitter::visitFunctionConversionExpr(FunctionConversionExpr *e,
16941691
switch(srcRepTy->getRepresentation()) {
16951692
case AnyFunctionType::Representation::Swift:
16961693
case AnyFunctionType::Representation::Thin:
1697-
// SWIFT_ENABLE_TENSORFLOW
1698-
case AnyFunctionType::Representation::TensorFlow:
16991694
// Source is native, so we can convert signature first.
17001695
destTy = adjustFunctionType(destRepTy,
17011696
srcTy->getRepresentation());
@@ -2469,17 +2464,6 @@ RValue RValueEmitter::visitAbstractClosureExpr(AbstractClosureExpr *e,
24692464
// Emit the closure body.
24702465
SGF.SGM.emitClosure(e);
24712466

2472-
// SWIFT_ENABLE_TENSORFLOW
2473-
// Make sure that no values are captured if this a tensorflow function.
2474-
auto *closureType = e->getType()->castTo<AnyFunctionType>();
2475-
const auto &captureInfo = e->getCaptureInfo();
2476-
if (closureType->getExtInfo().getRepresentation() ==
2477-
FunctionTypeRepresentation::TensorFlow &&
2478-
(captureInfo.hasLocalCaptures() || captureInfo.hasDynamicSelfCapture())) {
2479-
SGF.SGM.diagnose(e, diag::tf_no_captures_in_tf_functions);
2480-
return RValue(SGF, e, SGF.emitUndef(e, e->getType()));
2481-
}
2482-
24832467
SubstitutionMap subs;
24842468
if (e->getCaptureInfo().hasGenericParamCaptures())
24852469
subs = SGF.getForwardingSubstitutionMap();
@@ -4009,8 +3993,6 @@ static bool isVerbatimNullableTypeInC(SILModule &M, Type ty) {
40093993
// Was already bridged.
40103994
case FunctionTypeRepresentation::Swift:
40113995
case FunctionTypeRepresentation::Thin:
4012-
// SWIFT_ENABLE_TENSORFLOW
4013-
case FunctionType::Representation::TensorFlow:
40143996
return false;
40153997
}
40163998
}
@@ -4133,8 +4115,6 @@ static bool mayLieAboutNonOptionalReturn(SILModule &M, Expr *expr) {
41334115
return true;
41344116
case FunctionTypeRepresentation::Swift:
41354117
case FunctionTypeRepresentation::Thin:
4136-
// SWIFT_ENABLE_TENSORFLOW
4137-
case FunctionTypeRepresentation::TensorFlow:
41384118
return false;
41394119
}
41404120
}

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ static void addMandatoryOptPipeline(SILPassPipelinePlan &P,
116116
P.addEmitDFDiagnostics();
117117
// Canonical swift requires all non cond_br critical edges to be split.
118118
P.addSplitNonCondBrCriticalEdges();
119-
120-
// SWIFT_ENABLE_TENSORFLOW
121-
P.addTFDeabstractionMandatory();
122119
}
123120

124121
SILPassPipelinePlan
@@ -394,7 +391,6 @@ static void addMidModulePassesStackPromotePassPipeline(SILPassPipelinePlan &P) {
394391

395392
static void addMidLevelPassPipeline(SILPassPipelinePlan &P) {
396393
P.startPipeline("MidLevel");
397-
P.addTFDeabstractionOpt();
398394
addSSAPasses(P, OptimizationLevelKind::MidLevel);
399395

400396
// Specialize partially applied functions with dead arguments as a preparation
@@ -627,9 +623,6 @@ SILPassPipelinePlan SILPassPipelinePlan::getOnonePassPipeline() {
627623
// Has only an effect if the -gsil option is specified.
628624
P.addSILDebugInfoGenerator();
629625

630-
// SWIFT_ENABLE_TENSORFLOW
631-
P.addTFPartitionMandatory();
632-
633626
return P;
634627
}
635628

@@ -641,7 +634,6 @@ SILPassPipelinePlan SILPassPipelinePlan::getOnonePassPipeline() {
641634
SILPassPipelinePlan SILPassPipelinePlan::getTFPartitionPassPipeline() {
642635
SILPassPipelinePlan P;
643636
P.startPipeline("TensorFlow Partitioning");
644-
P.addTFPartitionOpt();
645637
return P;
646638
}
647639
/// SWIFT_ENABLE_TENSORFLOW End

lib/Sema/CSApply.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6126,19 +6126,6 @@ maybeDiagnoseUnsupportedFunctionConversion(ConstraintSystem &cs, Expr *expr,
61266126
Type fromType = cs.getType(expr);
61276127
auto fromFnType = fromType->getAs<AnyFunctionType>();
61286128

6129-
// SWIFT_ENABLE_TENSORFLOW
6130-
// If function types have different representations and one of them is
6131-
// @convention(tensorflow), reject it.
6132-
auto toTypeRepr = toType->getRepresentation();
6133-
auto fromTypeRepr = fromFnType->getRepresentation();
6134-
if (toTypeRepr != fromTypeRepr &&
6135-
(toTypeRepr == AnyFunctionType::Representation::TensorFlow ||
6136-
fromTypeRepr == AnyFunctionType::Representation::TensorFlow)) {
6137-
tc.diagnose(expr->getLoc(),
6138-
diag::invalid_tensorflow_fn_conversion);
6139-
return;
6140-
}
6141-
61426129
// Conversions to C function pointer type are limited. Since a C function
61436130
// pointer captures no context, we can only do the necessary thunking or
61446131
// codegen if the original function is a direct reference to a global function
@@ -6783,21 +6770,6 @@ Expr *ExprRewriter::coerceToType(Expr *expr, Type toType,
67836770
expr = cs.cacheType(new (tc.Context)
67846771
AutoDiffFunctionExtractOriginalExpr(expr, fromFunc));
67856772
}
6786-
// If we have a ClosureExpr, then we can safely propagate tensorflow
6787-
// convention to the closure expression.
6788-
// NOTE: we also need to check if the closure captures any values.
6789-
// However, capture information is not available at this point. Therefore,
6790-
// the check currently happens in the SILGen phase.
6791-
if (toEI.getRepresentation() ==
6792-
AnyFunctionType::Representation::TensorFlow &&
6793-
fromEI.getRepresentation() !=
6794-
AnyFunctionType::Representation::TensorFlow) {
6795-
auto newFromFuncType = fromFunc->withExtInfo(fromEI.withRepresentation(
6796-
AnyFunctionType::Representation::TensorFlow));
6797-
if (applyTypeToClosureExpr(cs, expr, newFromFuncType)) {
6798-
fromFunc = newFromFuncType->castTo<FunctionType>();
6799-
}
6800-
}
68016773
// If we have a ClosureExpr, then we can safely propagate the 'no escape'
68026774
// bit to the closure without invalidating prior analysis.
68036775
fromEI = fromFunc->getExtInfo();

lib/Sema/TypeCheckAttr.cpp

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3350,41 +3350,8 @@ void AttributeChecker::visitCompilerEvaluableAttr(CompilerEvaluableAttr *attr) {
33503350

33513351
// SWIFT_ENABLE_TENSORFLOW
33523352
void AttributeChecker::visitTensorFlowGraphAttr(TensorFlowGraphAttr *attr) {
3353-
FuncDecl *FD = cast<FuncDecl>(D);
3354-
// The function must be top-level.
3355-
if (FD->getImplicitSelfDecl()) {
3356-
diagnoseAndRemoveAttr(attr, diag::tf_graph_attr_top_level_only);
3357-
return;
3358-
}
3359-
// Generic functions are not supported.
3360-
if (FD->isGeneric()) {
3361-
diagnoseAndRemoveAttr(attr, diag::tf_graph_attr_no_generic_functions);
3362-
return;
3363-
}
3364-
// Only functions taking and returning TensorFlow values are permitted.
3365-
auto allParamsAreTFValues = llvm::all_of(FD->getParameters()->getArray(),
3366-
[&](ParamDecl *decl) {
3367-
return tf::isTensorFlowValueOrAggregate(decl->getInterfaceType());
3368-
});
3369-
if (!allParamsAreTFValues ||
3370-
!tf::isTensorFlowValueOrAggregate(FD->getResultInterfaceType())) {
3371-
diagnoseAndRemoveAttr(attr,
3372-
diag::tf_graph_attr_function_tensorflow_value_only);
3373-
return;
3374-
}
3375-
// Only functions with no captures are permitted.
3376-
TC.computeCaptures(FD);
3377-
if (!FD->getCaptureInfo().isTrivial()) {
3378-
diagnoseAndRemoveAttr(attr,
3379-
diag::tf_graph_attr_no_functions_with_captures);
3380-
return;
3381-
}
3382-
// Assign @convention(tensorflow).
3383-
AnyFunctionType *fnTy = FD->getInterfaceType()->castTo<AnyFunctionType>();
3384-
auto *newFnTy = fnTy->withExtInfo(
3385-
fnTy->getExtInfo().withRepresentation(
3386-
AnyFunctionType::Representation::TensorFlow));
3387-
FD->setInterfaceType(newFnTy);
3353+
diagnoseAndRemoveAttr(attr, diag::tf_graph_deprecated_please_remove);
3354+
return;
33883355
}
33893356

33903357
// SWIFT_ENABLE_TENSORFLOW

lib/Sema/TypeCheckType.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,8 +2021,6 @@ Type TypeResolver::resolveAttributedType(TypeAttributes &attrs,
20212021
.Case("block", SILFunctionType::Representation::Block)
20222022
.Case("thin", SILFunctionType::Representation::Thin)
20232023
.Case("c", SILFunctionType::Representation::CFunctionPointer)
2024-
// SWIFT_ENABLE_TENSORFLOW
2025-
.Case("tensorflow", SILFunctionType::Representation::TensorFlow)
20262024
.Case("method", SILFunctionType::Representation::Method)
20272025
.Case("objc_method", SILFunctionType::Representation::ObjCMethod)
20282026
.Case("witness_method",
@@ -2063,8 +2061,6 @@ Type TypeResolver::resolveAttributedType(TypeAttributes &attrs,
20632061
.Case("block", FunctionType::Representation::Block)
20642062
.Case("thin", FunctionType::Representation::Thin)
20652063
.Case("c", FunctionType::Representation::CFunctionPointer)
2066-
// SWIFT_ENABLE_TENSORFLOW
2067-
.Case("tensorflow", FunctionType::Representation::TensorFlow)
20682064
.Default(None);
20692065
if (!parsedRep) {
20702066
diagnose(attrs.getLoc(TAK_convention),
@@ -2405,8 +2401,6 @@ Type TypeResolver::resolveASTFunctionType(FunctionTypeRepr *repr,
24052401
}
24062402
break;
24072403

2408-
// SWIFT_ENABLE_TENSORFLOW
2409-
case AnyFunctionType::Representation::TensorFlow:
24102404
case AnyFunctionType::Representation::Thin:
24112405
case AnyFunctionType::Representation::Swift:
24122406
break;

lib/Serialization/Deserialization.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4113,8 +4113,6 @@ getActualFunctionTypeRepresentation(uint8_t rep) {
41134113
CASE(Block)
41144114
CASE(Thin)
41154115
CASE(CFunctionPointer)
4116-
// SWIFT_ENABLE_TENSORFLOW
4117-
CASE(TensorFlow)
41184116
#undef CASE
41194117
default:
41204118
return None;

lib/Serialization/Serialization.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3592,8 +3592,6 @@ static uint8_t getRawStableFunctionTypeRepresentation(
35923592
SIMPLE_CASE(FunctionTypeRepresentation, Block)
35933593
SIMPLE_CASE(FunctionTypeRepresentation, Thin)
35943594
SIMPLE_CASE(FunctionTypeRepresentation, CFunctionPointer)
3595-
// SWIFT_ENABLE_TENSORFLOW
3596-
SIMPLE_CASE(FunctionTypeRepresentation, TensorFlow)
35973595
}
35983596
llvm_unreachable("bad calling convention");
35993597
}

test/TensorFlow/accelerator_only_functions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-frontend -Xllvm -tf-dynamic-compilation -Xllvm -tf-dump-graph -Xllvm -tf-module-level-graph=false -O -emit-sil %s | %FileCheck %s
2+
// REQUIRES: deprecated_gpe_mode
23

34
import TensorFlow
45

test/TensorFlow/attr_tensorflow_graph_sema.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-typecheck-verify-swift
2+
// REQUIRES: deprecated_gpe_mode
23

34
import TensorFlow
45

test/TensorFlow/attr_tensorflow_graph_silgen.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s
2+
// REQUIRES: deprecated_gpe_mode
23

34
import TensorFlow
45

test/TensorFlow/control_flow.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-frontend -Xllvm -tf-dump-intermediates -Xllvm -tf-dump-graph -Xllvm -tf-module-level-graph=false -O -emit-sil %s -verify -enable-objc-interop -disable-objc-attr-requires-foundation-module -Xllvm -tf-dynamic-compilation=false | %FileCheck %s
2+
// REQUIRES: deprecated_gpe_mode
23

34
import TensorFlow
45

test/TensorFlow/crashers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-frontend -Xllvm -tf-dynamic-compilation=false -Xllvm -tf-dump-intermediates -O -emit-sil %s -verify | %FileCheck %s
2+
// REQUIRES: deprecated_gpe_mode
23

34
// This file contains various regression tests that crashed the compiler.
45

test/TensorFlow/dataset.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// RUN: %target-swift-frontend -Xllvm -tf-dynamic-compilation=false -Xllvm -tf-dump-intermediates -Xllvm -tf-dump-graph -O -emit-sil -verify %s | %FileCheck %s
2+
// REQUIRES: deprecated_gpe_mode
23
import TensorFlow
34

45
// Creates a dataset, which produces one float scalar value in each get next
56
// call.
6-
// TODO: declare with @convention tensorflow
77
// Enforce no sends/recvs, and all logic is lowered to TF graph.
8-
@TensorFlowGraph
98
public func createMockDataSet() -> VariantHandle {
109
let values = Tensor<Float>([1.0, 2.0, 3.0])
1110
// REGISTER_OP("TensorSliceDataset")

0 commit comments

Comments
 (0)