mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Update Fabric Latency to Edge Properties (2)
- Only initialize vertexes when queried. - Return also bandwidth when calling PRELIM_DRM_I915_QUERY_FABRIC_INFO. Related-To: LOCI-3464 Signed-off-by: Jaime A Arteaga Molina <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
638aba45a0
commit
5446b9ca0d
@@ -134,7 +134,7 @@ class IoctlHelper {
|
||||
virtual std::string getFileForMaxGpuFrequency() const;
|
||||
virtual std::string getFileForMaxGpuFrequencyOfSubDevice(int subDeviceId) const;
|
||||
virtual std::string getFileForMaxMemoryFrequencyOfSubDevice(int subDeviceId) const;
|
||||
virtual bool getFabricLatency(uint32_t fabricId, uint32_t &latency) = 0;
|
||||
virtual bool getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) = 0;
|
||||
|
||||
uint32_t getFlagsForPrimeHandleToFd() const;
|
||||
|
||||
@@ -191,7 +191,7 @@ class IoctlHelperUpstream : public IoctlHelper {
|
||||
int getDrmParamValue(DrmParam drmParam) const override;
|
||||
std::string getDrmParamString(DrmParam param) const override;
|
||||
std::string getIoctlString(DrmIoctl ioctlRequest) const override;
|
||||
bool getFabricLatency(uint32_t fabricId, uint32_t &latency) override;
|
||||
bool getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) override;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
@@ -258,7 +258,7 @@ class IoctlHelperPrelim20 : public IoctlHelper {
|
||||
std::string getDrmParamString(DrmParam param) const override;
|
||||
std::string getIoctlString(DrmIoctl ioctlRequest) const override;
|
||||
bool checkIfIoctlReinvokeRequired(int error, DrmIoctl ioctlRequest) const override;
|
||||
bool getFabricLatency(uint32_t fabricId, uint32_t &latency) override;
|
||||
bool getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) override;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -655,7 +655,7 @@ bool IoctlHelperPrelim20::checkIfIoctlReinvokeRequired(int error, DrmIoctl ioctl
|
||||
return IoctlHelper::checkIfIoctlReinvokeRequired(error, ioctlRequest);
|
||||
}
|
||||
|
||||
bool IoctlHelperPrelim20::getFabricLatency(uint32_t fabricId, uint32_t &latency) {
|
||||
bool IoctlHelperPrelim20::getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) {
|
||||
Query query = {};
|
||||
QueryItem queryItem = {};
|
||||
PrelimI915::prelim_drm_i915_query_fabric_info info = {};
|
||||
@@ -673,13 +673,14 @@ bool IoctlHelperPrelim20::getFabricLatency(uint32_t fabricId, uint32_t &latency)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (info.latency < 10) {
|
||||
if (info.latency < 10 || info.bandwidth == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Latency is in tenths of path length. 10 == 1 fabric link between src and dst
|
||||
// 1 link = zero hops
|
||||
latency = (info.latency / 10) - 1;
|
||||
bandwidth = info.bandwidth;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ std::string IoctlHelperUpstream::getIoctlString(DrmIoctl ioctlRequest) const {
|
||||
}
|
||||
}
|
||||
|
||||
bool IoctlHelperUpstream::getFabricLatency(uint32_t fabricId, uint32_t &latency) {
|
||||
bool IoctlHelperUpstream::getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) {
|
||||
return false;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user