コード例 #1
0
        //TODO fix constructor to not include 3rd party handles + refactor inside interface device info (lookup fans speed/temps/...)
        public CudaComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int gpuCount,
                                 NvPhysicalGpuHandle nvHandle, nvmlDevice nvmlHandle)
            : base((int)cudaDevice.DeviceID,
                   cudaDevice.GetName(),
                   true,
                   group,
                   DeviceType.NVIDIA,
                   string.Format(Translations.Tr("GPU#{0}"), gpuCount),
                   cudaDevice.DeviceGlobalMemory)
        {
            BusID             = cudaDevice.pciBusID;
            SMMajor           = cudaDevice.SM_major;
            SMMinor           = cudaDevice.SM_minor;
            Uuid              = cudaDevice.UUID;
            AlgorithmSettings = DefaultAlgorithms.GetAlgorithmsForDevice(this);
            Index             = ID + AvailableDevices.AvailCpus; // increment by CPU count

            _nvHandle   = nvHandle;
            _nvmlDevice = nvmlHandle;

            ShouldRunEthlargement = cudaDevice.DeviceName.Contains("1080") || cudaDevice.DeviceName.Contains("Titan Xp");
            // plugin device
            var bd = new BaseDevice(DeviceType.NVIDIA, cudaDevice.UUID, cudaDevice.GetName(), (int)cudaDevice.DeviceID);

            PluginDevice = new CUDADevice(bd, cudaDevice.pciBusID, cudaDevice.DeviceGlobalMemory, cudaDevice.SM_major, cudaDevice.SM_minor);
        }
コード例 #2
0
        //TODO fix constructor to not include 3rd party handles + refactor inside interface device info (lookup fans speed/temps/...)
        public CudaComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int gpuCount,
                                 NvPhysicalGpuHandle nvHandle, nvmlDevice nvmlHandle)
            : base((int)cudaDevice.DeviceID,
                   cudaDevice.GetName(),
                   true,
                   group,
                   DeviceType.NVIDIA,
                   string.Format(Translations.Tr("GPU#{0}"), gpuCount),
                   cudaDevice.DeviceGlobalMemory)
        {
            BusID   = cudaDevice.pciBusID;
            SMMajor = cudaDevice.SM_major;
            SMMinor = cudaDevice.SM_minor;
            // if no nvml loaded fallback ID
            if (string.IsNullOrEmpty(cudaDevice.UUID))
            {
                Uuid = GetUuid(ID, GroupNames.GetGroupName(DeviceGroupType, ID), Name, DeviceGroupType);
            }
            else
            {
                Uuid = cudaDevice.UUID;
            }
            AlgorithmSettings = DefaultAlgorithms.GetAlgorithmsForDevice(this);
            Index             = ID + AvailableDevices.AvailCpus; // increment by CPU count

            _nvHandle   = nvHandle;
            _nvmlDevice = nvmlHandle;

            ShouldRunEthlargement = cudaDevice.DeviceName.Contains("1080") || cudaDevice.DeviceName.Contains("Titan Xp");
        }
コード例 #3
0
 // GPU NVIDIA
 public ComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int GPUCount)
 {
     ID                = (int)cudaDevice.DeviceID;
     Name              = cudaDevice.GetName();
     Enabled           = true;
     DeviceGroupType   = group;
     IsEtherumCapale   = cudaDevice.IsEtherumCapable();
     DeviceType        = DeviceType.NVIDIA;
     NameCount         = String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), GPUCount);
     UUID              = cudaDevice.UUID;
     AlgorithmSettings = GroupAlgorithms.CreateForDevice(this);
 }
コード例 #4
0
 // GPU NVIDIA
 public ComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int GPUCount)
 {
     _cudaDevice     = cudaDevice;
     ID              = (int)cudaDevice.DeviceID;
     Name            = cudaDevice.GetName();
     _nameNoNums     = cudaDevice.GetName();
     Enabled         = true;
     DeviceGroupType = group;
     IsEtherumCapale = cudaDevice.IsEtherumCapable();
     DeviceType      = DeviceType.NVIDIA;
     NameCount       = String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), GPUCount);
     UUID            = cudaDevice.UUID;
 }
コード例 #5
0
 public ComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int gpuCount)
 {
     SMMajor           = cudaDevice.SM_major;
     SMMinor           = cudaDevice.SM_minor;
     ID                = (int)cudaDevice.DeviceID;
     Name              = cudaDevice.GetName();
     Enabled           = true;
     DeviceGroupType   = group;
     IsEtherumCapale   = cudaDevice.IsEtherumCapable();
     DeviceType        = DeviceType.NVIDIA;
     NameCount         = string.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), gpuCount);
     Uuid              = cudaDevice.UUID;
     AlgorithmSettings = GroupAlgorithms.CreateForDeviceList(this);
     GpuRam            = cudaDevice.DeviceGlobalMemory;
 }
コード例 #6
0
 // GPU NVIDIA
 public ComputeDevice(CudaDevice cudaDevice, string group, bool addToGlobalList = false, bool enabled = true)
 {
     _cudaDevice       = cudaDevice;
     ID                = (int)cudaDevice.DeviceID;
     Group             = group;
     Name              = cudaDevice.GetName();
     _nameNoNums       = cudaDevice.GetName();
     Enabled           = enabled;
     DeviceGroupType   = GroupNames.GetType(Group);
     DeviceGroupString = GroupNames.GetNameGeneral(DeviceGroupType);
     IsEtherumCapale   = cudaDevice.IsEtherumCapable();
     DeviceType        = DeviceType.NVIDIA;
     InitGlobalsList(addToGlobalList);
     NameCount = String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), ++GPUCount);
     UUID      = cudaDevice.UUID;
 }
コード例 #7
0
        public CudaComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int GPUCount, NvPhysicalGpuHandle nvHandle)
            : base((int)cudaDevice.DeviceID,
                   cudaDevice.GetName(),
                   true,
                   group,
                   cudaDevice.IsEtherumCapable(),
                   DeviceType.NVIDIA,
                   String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), GPUCount),
                   cudaDevice.DeviceGlobalMemory)
        {
            _SM_major         = cudaDevice.SM_major;
            _SM_minor         = cudaDevice.SM_minor;
            UUID              = cudaDevice.UUID;
            AlgorithmSettings = GroupAlgorithms.CreateForDeviceList(this);
            Index             = ID + ComputeDeviceManager.Avaliable.AvailCPUs; // increment by CPU count

            this.nvHandle = nvHandle;
        }
コード例 #8
0
        public CudaComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int gpuCount,
                                 NvPhysicalGpuHandle nvHandle, nvmlDevice nvmlHandle)
            : base((int)cudaDevice.DeviceID,
                   cudaDevice.GetName(),
                   true,
                   group,
                   cudaDevice.IsEtherumCapable(),
                   DeviceType.NVIDIA,
                   string.Format(Translations.Tr("GPU#{0}"), gpuCount),
                   cudaDevice.DeviceGlobalMemory)
        {
            BusID             = cudaDevice.pciBusID;
            SMMajor           = cudaDevice.SM_major;
            SMMinor           = cudaDevice.SM_minor;
            Uuid              = cudaDevice.UUID;
            AlgorithmSettings = GroupAlgorithms.CreateForDeviceList(this);
            Index             = ID + AvailableDevices.AvailCpus; // increment by CPU count

            _nvHandle   = nvHandle;
            _nvmlDevice = nvmlHandle;

            ShouldRunEthlargement = cudaDevice.DeviceName.Contains("1080") || cudaDevice.DeviceName.Contains("Titan Xp");
        }
コード例 #9
0
 // GPU NVIDIA
 public ComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int GPUCount)
 {
     ID = (int)cudaDevice.DeviceID;
     Name = cudaDevice.GetName();
     Enabled = true;
     DeviceGroupType = group;
     IsEtherumCapale = cudaDevice.IsEtherumCapable();
     DeviceType = DeviceType.NVIDIA;
     NameCount = String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), GPUCount);
     UUID = cudaDevice.UUID;
     AlgorithmSettings = GroupAlgorithms.CreateForDevice(this);
 }
コード例 #10
0
 // GPU NVIDIA
 public ComputeDevice(CudaDevice cudaDevice, string group, bool addToGlobalList = false, bool enabled = true)
 {
     _cudaDevice = cudaDevice;
     ID = (int)cudaDevice.DeviceID;
     Group = group;
     Name = cudaDevice.GetName();
     _nameNoNums = cudaDevice.GetName();
     Enabled = enabled;
     DeviceGroupType = GroupNames.GetType(Group);
     DeviceGroupString = GroupNames.GetNameGeneral(DeviceGroupType);
     IsEtherumCapale = cudaDevice.IsEtherumCapable();
     DeviceType = DeviceType.NVIDIA;
     InitGlobalsList(addToGlobalList);
     NameCount = String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), ++GPUCount);
     UUID = cudaDevice.UUID;
 }