Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fdoving committed Nov 26, 2021
1 parent 632f6ea commit 2f9d401
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
18 changes: 17 additions & 1 deletion libethash-cl/CLMiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ void CLMiner::enumDevices(std::map<string, DeviceDescriptor>& _DevicesCollection
platformType = ClPlatformTypeEnum::Clover;
else if (platformName == "NVIDIA CUDA")
platformType = ClPlatformTypeEnum::Nvidia;
else if (platformName.find("Intel") != string::npos)
platformType = ClPlatformTypeEnum::Intel;
else
{
std::cerr << "Unrecognized platform " << platformName << std::endl;
Expand Down Expand Up @@ -529,6 +531,13 @@ void CLMiner::enumDevices(std::map<string, DeviceDescriptor>& _DevicesCollection
uniqueId = s.str();
}
}
else if (clDeviceType == DeviceTypeEnum::Gpu && platformType == ClPlatformTypeEnum::Intel)
{
std::ostringstream s;
s << "Intel GPU " << pIdx << "." << dIdx;
uniqueId = s.str();

}
else if (clDeviceType == DeviceTypeEnum::Cpu)
{
std::ostringstream s;
Expand Down Expand Up @@ -644,6 +653,13 @@ bool CLMiner::initDevice()
m_hwmoninfo.devicePciId = m_deviceDescriptor.uniqueId;
m_hwmoninfo.deviceIndex = -1; // Will be later on mapped by nvml (see Farm() constructor)
}
else if (m_deviceDescriptor.clPlatformType == ClPlatformTypeEnum::Intel)
{
m_hwmoninfo.deviceType = HwMonitorInfoType::UNKNOWN;
m_hwmoninfo.devicePciId = m_deviceDescriptor.uniqueId;
m_hwmoninfo.deviceIndex = -1; // Will be later on mapped by nvml (see Farm() constructor)
}

else
{
// Don't know what to do with this
Expand All @@ -670,7 +686,7 @@ bool CLMiner::initDevice()
}

ostringstream s;
s << "Using PciId : " << m_deviceDescriptor.uniqueId << " " << m_deviceDescriptor.clName;
s << "Using Device : " << m_deviceDescriptor.uniqueId << " " << m_deviceDescriptor.clName;

if (!m_deviceDescriptor.clNvCompute.empty())
s << " (Compute " + m_deviceDescriptor.clNvCompute + ")";
Expand Down
3 changes: 2 additions & 1 deletion libethcore/Miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ enum class ClPlatformTypeEnum
Unknown,
Amd,
Clover,
Nvidia
Nvidia,
Intel
};

enum class SolutionAccountingEnum
Expand Down

0 comments on commit 2f9d401

Please sign in to comment.