Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
xyang16 committed Aug 16, 2024
1 parent 8cb82fd commit 05886d4
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
/** {@code RsModel} is the Rust implementation of {@link Model}. */
public class RsModel extends BaseModel {

private Device device;
private final AtomicReference<Long> handle;

/**
Expand All @@ -39,7 +38,6 @@ public class RsModel extends BaseModel {
*/
RsModel(String name, Device device) {
super(name);
this.device = device;
manager = RsNDManager.getSystemManager().newSubManager(device);
manager.setName("RsModel");
dataType = DataType.FLOAT16;
Expand All @@ -60,8 +58,8 @@ public void load(Path modelPath, String prefix, Map<String, ?> options)
RustLibrary.loadModel(
modelDir.toAbsolutePath().toString(),
dataType.ordinal(),
device.getDeviceType(),
device.getDeviceId()));
manager.getDevice().getDeviceType(),
manager.getDevice().getDeviceId()));
block = new RsSymbolBlock((RsNDManager) manager, handle.get());
} else {
loadBlock(prefix, options);
Expand Down

0 comments on commit 05886d4

Please sign in to comment.