Skip to content

Commit 7aef1a6

Browse files
authored
Fix unresolved symbols on windows (#390)
1 parent 05d9de3 commit 7aef1a6

File tree

1 file changed

+30
-43
lines changed
  • tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/c_api/presets

1 file changed

+30
-43
lines changed

tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java

Lines changed: 30 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ public void init(ClassProperties properties) {
272272
@Override
273273
public void map(InfoMap infoMap) {
274274
infoMap
275+
.put(
276+
new Info("c_api_experimental.h")
277+
.linePatterns(
278+
"typedef struct TFE_OpAttrs TFE_OpAttrs;",
279+
"#define TFE_CUSTOM_DEVICE_VERSION 4"))
275280
.put(new Info("TF_CAPI_EXPORT", "TF_Bool").cppTypes().annotations())
276281
.put(
277282
new Info("TF_Buffer::data")
@@ -315,49 +320,10 @@ public void map(InfoMap infoMap) {
315320
new Info("TF_ImportGraphDefOptions")
316321
.pointerTypes("TF_ImportGraphDefOptions")
317322
.base("org.tensorflow.internal.c_api.AbstractTF_ImportGraphDefOptions"))
318-
.put(
319-
new Info(
320-
"TF_Operation",
321-
"TF_WhileParams",
322-
"TFE_MonitoringCounterCell",
323-
"TFE_MonitoringSamplerCell",
324-
"TFE_MonitoringCounter0",
325-
"TFE_MonitoringCounter1",
326-
"TFE_MonitoringCounter2",
327-
"TFE_MonitoringIntGaugeCell",
328-
"TFE_MonitoringStringGaugeCell",
329-
"TFE_MonitoringBoolGaugeCell",
330-
"TFE_MonitoringIntGauge0",
331-
"TFE_MonitoringIntGauge1",
332-
"TFE_MonitoringIntGauge2",
333-
"TFE_MonitoringStringGauge0",
334-
"TFE_MonitoringStringGauge1",
335-
"TFE_MonitoringStringGauge2",
336-
"TFE_MonitoringBoolGauge0",
337-
"TFE_MonitoringBoolGauge1",
338-
"TFE_MonitoringBoolGauge2",
339-
"TFE_MonitoringSampler0",
340-
"TFE_MonitoringSampler1",
341-
"TFE_MonitoringSampler2")
342-
.purify())
323+
.put(new Info("TF_Operation", "TF_WhileParams").purify())
343324
.put(
344325
new Info("TF_Operation::node")
345326
.javaText("public native @MemberGetter @ByRef Node node();"))
346-
.put(
347-
new Info("TFE_MonitoringCounterCell::cell")
348-
.javaText("public native @MemberGetter @ByRef CounterCell cell();"))
349-
.put(
350-
new Info("TFE_MonitoringSamplerCell::cell")
351-
.javaText("public native @MemberGetter @ByRef SamplerCell cell();"))
352-
.put(
353-
new Info("TFE_MonitoringIntGaugeCell::cell")
354-
.javaText("public native @MemberGetter @ByRef IntGaugeCell cell();"))
355-
.put(
356-
new Info("TFE_MonitoringStringGaugeCell::cell")
357-
.javaText("public native @MemberGetter @ByRef StringGaugeCell cell();"))
358-
.put(
359-
new Info("TFE_MonitoringBoolGaugeCell::cell")
360-
.javaText("public native @MemberGetter @ByRef BoolGaugeCell cell();"))
361327
.put(
362328
new Info("TFE_Context")
363329
.pointerTypes("TFE_Context")
@@ -385,8 +351,29 @@ public void map(InfoMap infoMap) {
385351
new Info(
386352
"TF_ShapeInferenceContextDimValueKnown",
387353
"TFE_NewTensorHandle(const tensorflow::Tensor&, TF_Status*)",
388-
"TF_InitKernel")
389-
.skip())
390-
.put(new Info("TFE_CustomDeviceTensorHandle", "TFE_CustomDevice").skip());
354+
"TF_InitKernel",
355+
"TFE_MonitoringCounterCell",
356+
"TFE_MonitoringCounter0",
357+
"TFE_MonitoringCounter1",
358+
"TFE_MonitoringCounter2",
359+
"TFE_MonitoringIntGaugeCell",
360+
"TFE_MonitoringIntGauge0",
361+
"TFE_MonitoringIntGauge1",
362+
"TFE_MonitoringIntGauge2",
363+
"TFE_MonitoringStringGaugeCell",
364+
"TFE_MonitoringStringGauge0",
365+
"TFE_MonitoringStringGauge1",
366+
"TFE_MonitoringStringGauge2",
367+
"TFE_MonitoringBoolGaugeCell",
368+
"TFE_MonitoringBoolGauge0",
369+
"TFE_MonitoringBoolGauge1",
370+
"TFE_MonitoringBoolGauge2",
371+
"TFE_MonitoringSamplerCell",
372+
"TFE_MonitoringSampler0",
373+
"TFE_MonitoringSampler1",
374+
"TFE_MonitoringSampler2",
375+
"TFE_CustomDeviceTensorHandle",
376+
"TFE_CustomDevice")
377+
.skip());
391378
}
392379
}

0 commit comments

Comments
 (0)