Skip to content

Commit

Permalink
[api] Remove unnecessary DeviceType interface
Browse files Browse the repository at this point in the history
Change-Id: Ife754d8b82371c1cd86d8201d003fe8f7995ed92
  • Loading branch information
frankfliu committed Aug 31, 2022
1 parent 319d80c commit 22a0d12
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 42 deletions.
37 changes: 0 additions & 37 deletions api/src/main/java/ai/djl/DeviceType.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
package ai.djl.mxnet.engine;

import ai.djl.Device;
import ai.djl.DeviceType;

/** DeviceType is the MXNet equivalent of the types in {@link Device}. */
public final class MxDeviceType implements DeviceType {
public final class MxDeviceType {

private static final String CPU_PINNED = "cpu_pinned";

Expand All @@ -38,7 +37,7 @@ public static int toDeviceType(Device device) {
} else if (CPU_PINNED.equals(deviceType)) {
return 3;
} else {
throw new IllegalArgumentException("Unsupported device: " + device.toString());
throw new IllegalArgumentException("Unsupported device: " + device);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
package ai.djl.pytorch.engine;

import ai.djl.Device;
import ai.djl.DeviceType;

/** DeviceType is the PyTorch equivalent of the types in {@link Device}. */
public final class PtDeviceType implements DeviceType {
public final class PtDeviceType {

private PtDeviceType() {}

Expand Down

0 comments on commit 22a0d12

Please sign in to comment.