Skip to content
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

[api] Remove unnecessary DeviceType interface #1978

Merged
merged 1 commit into from
Aug 31, 2022
Merged
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
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