Package ai.djl.engine
Interface EngineProvider
public interface EngineProvider
The
EngineProvider
instance manufactures an Engine
instance, which is available
in the system.
At initialization time, the ServiceLoader
will search for
EngineProvider
implementations available in the class path.
Engine
is designed as a collection of singletons. Engine.getInstance()
will
return the default Engine, which is the first one found in the classpath. Many of the standard
APIs will rely on this default Engine instance such as when creating a NDManager
or Model
. However, you can directly get a specific
Engine instance (e.g. MxEngine
) by calling Engine.getEngine(String)
.
-
Method Details
-
getEngineName
String getEngineName()Returns the name of theEngine
.- Returns:
- the name of
Engine
-
getEngineRank
int getEngineRank()Returns the rank of theEngine
.- Returns:
- the rank of
Engine
-
getEngine
Engine getEngine()Returns the instance of theEngine
class EngineProvider should bind to.- Returns:
- the instance of
Engine
-