Skip to content

Commit

Permalink
[inf2] Should not pass neuron device to PyTorch engine (deepjavalibra…
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu authored Mar 8, 2023
1 parent 8a90769 commit 525dc58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wlm/src/main/java/ai/djl/serving/wlm/ModelInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,12 @@ public void load(Device device) throws ModelException, IOException {
}
}
logger.info("Loading model {} on {}", id, device);
builder.optDevice(device);
if ("nc".equals(device.getDeviceType()) && "PyTorch".equals(engineName)) {
// assume neuron only support PyTorch
logger.info("Bypass NC core allocation");
} else {
builder.optDevice(device);
}

ZooModel<I, O> m = builder.build().loadModel();
if (criteria != null) {
Expand Down

0 comments on commit 525dc58

Please sign in to comment.