Package ai.djl.engine
Interface EngineProvider
-
public interface EngineProvider
TheEngineProvider
instance manufactures anEngine
instance, which is available in the system.At initialization time, the
ServiceLoader
will search forEngineProvider
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 aNDManager
orModel
. However, you can directly get a specific Engine instance (e.g.MxEngine
) by callingEngine.getEngine(String)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Engine
getEngine()
Returns the instance of theEngine
class EngineProvider should bind to.java.lang.String
getEngineName()
Returns the name of theEngine
.int
getEngineRank()
Returns the rank of theEngine
.
-