mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
refactor: remove unused code
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
451e8a3605
commit
a390327ef9
@@ -481,7 +481,6 @@ DECLARE_DEBUG_VARIABLE(bool, DirectSubmissionPrintBuffers, false, "Print address
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, WaitForPagingFenceInController, -1, "Instead of waiting for paging fence on user thread, program additional semaphore which will be signaled by direct submission controller when paging fence reaches required value -1: default, 0 - disable, 1 - enable.")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionControllerIdleDetection, -1, "Terminate direct submission only if CSR is idle. -1: default, 0 - disable, 1 - enable.")
|
||||
/*FEATURE FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(bool, USMEvictAfterMigration, false, "Evict USM allocation after implicit migration to GPU")
|
||||
DECLARE_DEBUG_VARIABLE(bool, RegisterPageFaultHandlerOnMigration, false, "Register handler on migration to GPU when current is not from pagefault manager")
|
||||
DECLARE_DEBUG_VARIABLE(bool, EnableNV12, true, "Enables NV12 extension")
|
||||
DECLARE_DEBUG_VARIABLE(bool, EnablePackedYuv, true, "Enables cl_packed_yuv extension")
|
||||
|
||||
@@ -61,7 +61,6 @@ class CpuPageFaultManager : public NonCopyableClass {
|
||||
MOCKABLE_VIRTUAL void transferToCpu(void *ptr, size_t size, void *cmdQ);
|
||||
|
||||
protected:
|
||||
virtual void evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) = 0;
|
||||
virtual void allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) = 0;
|
||||
|
||||
virtual bool checkFaultHandlerFromPageFaultManager() = 0;
|
||||
|
||||
@@ -34,9 +34,6 @@ std::function<void(int signal, siginfo_t *info, void *context)> PageFaultManager
|
||||
PageFaultManagerLinux::PageFaultManagerLinux() {
|
||||
PageFaultManagerLinux::registerFaultHandler();
|
||||
UNRECOVERABLE_IF(pageFaultHandler == nullptr);
|
||||
|
||||
this->evictMemoryAfterCopy = debugManager.flags.EnableDirectSubmission.get() &&
|
||||
debugManager.flags.USMEvictAfterMigration.get();
|
||||
}
|
||||
|
||||
PageFaultManagerLinux::~PageFaultManagerLinux() {
|
||||
@@ -119,12 +116,6 @@ void PageFaultManagerLinux::callPreviousHandler(int signal, siginfo_t *info, voi
|
||||
handlerIndex--;
|
||||
}
|
||||
|
||||
void PageFaultManagerLinux::evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) {
|
||||
if (evictMemoryAfterCopy) {
|
||||
device->getRootDeviceEnvironment().memoryOperationsInterface->evict(device, *allocation);
|
||||
}
|
||||
}
|
||||
|
||||
void PageFaultManagerLinux::allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) {}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -26,7 +26,6 @@ class PageFaultManagerLinux : public virtual CpuPageFaultManager {
|
||||
void protectCPUMemoryAccess(void *ptr, size_t size) override;
|
||||
void protectCpuMemoryFromWrites(void *ptr, size_t size) override;
|
||||
|
||||
void evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) override;
|
||||
void allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) override;
|
||||
|
||||
bool checkFaultHandlerFromPageFaultManager() override;
|
||||
@@ -39,7 +38,6 @@ class PageFaultManagerLinux : public virtual CpuPageFaultManager {
|
||||
|
||||
std::vector<struct sigaction> previousPageFaultHandlers;
|
||||
|
||||
bool evictMemoryAfterCopy = false;
|
||||
int handlerIndex = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -79,8 +79,6 @@ void PageFaultManagerWindows::protectCpuMemoryFromWrites(void *ptr, size_t size)
|
||||
UNRECOVERABLE_IF(!retVal);
|
||||
}
|
||||
|
||||
void PageFaultManagerWindows::evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) {}
|
||||
|
||||
void PageFaultManagerWindows::allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) {
|
||||
NEO::SvmAllocationData *allocData = this->memoryData[ptr].unifiedMemoryManager->getSVMAlloc(ptr);
|
||||
UNRECOVERABLE_IF(allocData == nullptr);
|
||||
|
||||
@@ -26,7 +26,6 @@ class PageFaultManagerWindows : public virtual CpuPageFaultManager {
|
||||
void protectCPUMemoryAccess(void *ptr, size_t size) override;
|
||||
void protectCpuMemoryFromWrites(void *ptr, size_t size) override;
|
||||
|
||||
void evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) override;
|
||||
void allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) override;
|
||||
|
||||
bool checkFaultHandlerFromPageFaultManager() override;
|
||||
|
||||
Reference in New Issue
Block a user