Skip to content

Code changes to add PluggableDevice support for Inference #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE

package org.tensorflow.internal.c_api;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.tensorflow.internal.c_api.global.tensorflow.*;


// TF_NewAttrBuilder() returns an object that you can set attributes on as
// though it were an op. This allows querying properties of that op for
// type-checking purposes like if the op will run on a particular device type.
@Opaque @Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class)
public class TF_AttrBuilder extends Pointer {
/** Empty constructor. Calls {@code super((Pointer)null)}. */
public TF_AttrBuilder() { super((Pointer)null); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public TF_AttrBuilder(Pointer p) { super(p); }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE

package org.tensorflow.internal.c_api;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.tensorflow.internal.c_api.global.tensorflow.*;


// TF_NewCheckpointReader() return the CheckpointReader that can be use to
// investigate or load the variable from the checkpoint file
@Opaque @Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class)
public class TF_CheckpointReader extends Pointer {
/** Empty constructor. Calls {@code super((Pointer)null)}. */
public TF_CheckpointReader() { super((Pointer)null); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public TF_CheckpointReader(Pointer p) { super(p); }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE

package org.tensorflow.internal.c_api;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.tensorflow.internal.c_api.global.tensorflow.*;


// Information about the shape of a Tensor and its type.
@Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class)
public class TF_ShapeAndType extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public TF_ShapeAndType() { super((Pointer)null); allocate(); }
/** Native array allocator. Access with {@link Pointer#position(long)}. */
public TF_ShapeAndType(long size) { super((Pointer)null); allocateArray(size); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public TF_ShapeAndType(Pointer p) { super(p); }
private native void allocate();
private native void allocateArray(long size);
@Override public TF_ShapeAndType position(long position) {
return (TF_ShapeAndType)super.position(position);
}
@Override public TF_ShapeAndType getPointer(long i) {
return new TF_ShapeAndType((Pointer)this).offsetAddress(i);
}

// Number of dimensions. -1 indicates unknown rank.
public native int num_dims(); public native TF_ShapeAndType num_dims(int setter);
// Array of dimensions. -1 indicates unknown dim.
public native @Cast("int64_t*") LongPointer dims(); public native TF_ShapeAndType dims(LongPointer setter);
// The data type. May be 0 to denote unknown type.
public native @Cast("TF_DataType") int dtype(); public native TF_ShapeAndType dtype(int setter);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE

package org.tensorflow.internal.c_api;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.tensorflow.internal.c_api.global.tensorflow.*;


// A list of TF_ShapeAndType elements..
@Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class)
public class TF_ShapeAndTypeList extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public TF_ShapeAndTypeList() { super((Pointer)null); allocate(); }
/** Native array allocator. Access with {@link Pointer#position(long)}. */
public TF_ShapeAndTypeList(long size) { super((Pointer)null); allocateArray(size); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public TF_ShapeAndTypeList(Pointer p) { super(p); }
private native void allocate();
private native void allocateArray(long size);
@Override public TF_ShapeAndTypeList position(long position) {
return (TF_ShapeAndTypeList)super.position(position);
}
@Override public TF_ShapeAndTypeList getPointer(long i) {
return new TF_ShapeAndTypeList((Pointer)this).offsetAddress(i);
}

public native int num_items(); public native TF_ShapeAndTypeList num_items(int setter);
public native TF_ShapeAndType items(); public native TF_ShapeAndTypeList items(TF_ShapeAndType setter);
}
Loading
Loading