mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Update Scheduler APIs as per latest spec
Change-Id: Ia8558ab30c83f1e30dae94cc7eb489ea7a8897da Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
fa8e39fe16
commit
94a26db5ba
@@ -17,6 +17,7 @@ const std::string LinuxSchedulerImp::timesliceDurationMilliSecs("engine/rcs0/tim
|
||||
const std::string LinuxSchedulerImp::defaultTimesliceDurationMilliSecs("engine/rcs0/.defaults/timeslice_duration_ms");
|
||||
const std::string LinuxSchedulerImp::heartbeatIntervalMilliSecs("engine/rcs0/heartbeat_interval_ms");
|
||||
const std::string LinuxSchedulerImp::defaultHeartbeatIntervalMilliSecs("engine/rcs0/.defaults/heartbeat_interval_ms");
|
||||
const std::string LinuxSchedulerImp::computeEngineDir("engine/rcs0");
|
||||
constexpr uint16_t milliSecsToMicroSecs = 1000;
|
||||
|
||||
ze_result_t LinuxSchedulerImp::getPreemptTimeout(uint64_t &timeout, ze_bool_t getDefault) {
|
||||
@@ -73,6 +74,14 @@ ze_result_t LinuxSchedulerImp::setHeartbeatInterval(uint64_t heartbeat) {
|
||||
return pSysfsAccess->write(heartbeatIntervalMilliSecs, heartbeat);
|
||||
}
|
||||
|
||||
ze_bool_t LinuxSchedulerImp::canControlScheduler() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool LinuxSchedulerImp::isSchedulerSupported() {
|
||||
return (ZE_RESULT_SUCCESS == pSysfsAccess->canRead(computeEngineDir));
|
||||
}
|
||||
|
||||
LinuxSchedulerImp::LinuxSchedulerImp(OsSysman *pOsSysman) {
|
||||
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||
pSysfsAccess = &pLinuxSysmanImp->getSysfsAccess();
|
||||
|
||||
@@ -25,6 +25,8 @@ class LinuxSchedulerImp : public OsScheduler, NEO::NonCopyableOrMovableClass {
|
||||
ze_result_t setPreemptTimeout(uint64_t timeout) override;
|
||||
ze_result_t setTimesliceDuration(uint64_t timeslice) override;
|
||||
ze_result_t setHeartbeatInterval(uint64_t heartbeat) override;
|
||||
ze_bool_t canControlScheduler() override;
|
||||
bool isSchedulerSupported() override;
|
||||
LinuxSchedulerImp() = default;
|
||||
LinuxSchedulerImp(OsSysman *pOsSysman);
|
||||
~LinuxSchedulerImp() override = default;
|
||||
@@ -39,6 +41,7 @@ class LinuxSchedulerImp : public OsScheduler, NEO::NonCopyableOrMovableClass {
|
||||
static const std::string defaultTimesliceDurationMilliSecs;
|
||||
static const std::string heartbeatIntervalMilliSecs;
|
||||
static const std::string defaultHeartbeatIntervalMilliSecs;
|
||||
static const std::string computeEngineDir;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user