Skip to content

#3203 additional info in cuda detect - #6809

Merged
sklam merged 8 commits into
numba:masterfrom
rawwar:3203_additional_info_in_cuda_detect
Mar 10, 2021
Merged

sklam merged 8 commits into
numba:masterfrom
rawwar:3203_additional_info_in_cuda_detect

Conversation

@rawwar

@rawwar rawwar commented Mar 9, 2021

Copy link
Copy Markdown
Contributor

PR related to Issue #3203.

numba.cuda.detect() now prints Watchdog Enabled Status, Compute Mode and Single precision to Double-precision performance ratio

@gmarkall

gmarkall commented Mar 9, 2021

Copy link
Copy Markdown
Member

On my Windows machine:

(numba) C:\Users\Graham Markall> python -c "from numba import cuda; cuda.detect()"
c:\work\numbadev\numba\numba\__init__.py:106: UserWarning: llvmlite version format not recognized!
  warnings.warn("llvmlite version format not recognized!")
Found 2 CUDA devices
id 0      b'Quadro RTX 8000'                              [SUPPORTED]
                      compute capability: 7.5
                           pci device id: 0
                              pci bus id: 21
                        Watchdog Enabled: 0
                            Compute Mode: TCC
             FP32/FP64 Performance Ratio: 32
id 1      b'Quadro RTX 8000'                              [SUPPORTED]
                      compute capability: 7.5
                           pci device id: 0
                              pci bus id: 45
                        Watchdog Enabled: 1
                            Compute Mode: WDDM
             FP32/FP64 Performance Ratio: 32
Summary:
        2/2 devices are supported

The watchdog status and driver mode aligns with nvidia-smi output:

(numba) C:\Users\Graham Markall> nvidia-smi
Tue Mar  9 15:25:56 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 461.40       Driver Version: 461.40       CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro RTX 8000     TCC  | 00000000:15:00.0 Off |                  Off |
| 33%   33C    P8    31W / 260W |      1MiB / 48767MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  Quadro RTX 8000    WDDM  | 00000000:2D:00.0  On |                  Off |
| 33%   44C    P8    35W / 260W |    918MiB / 49152MiB |     12%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

@gmarkall

gmarkall commented Mar 9, 2021

Copy link
Copy Markdown
Member

On my Linux machine:

$ python -c "from numba import cuda; cuda.detect()"
Found 2 CUDA devices
id 0    b'NVIDIA Quadro RTX 8000'                              [SUPPORTED]
                      compute capability: 7.5
                           pci device id: 0
                              pci bus id: 21
                        Watchdog Enabled: 1
                            Compute Mode: WDDM
             FP32/FP64 Performance Ratio: 32
id 1    b'NVIDIA Quadro RTX 8000'                              [SUPPORTED]
                      compute capability: 7.5
                           pci device id: 0
                              pci bus id: 45
                        Watchdog Enabled: 0
                            Compute Mode: WDDM
             FP32/FP64 Performance Ratio: 32
Summary:
	2/2 devices are supported

The "Watchdog Enabled" status matches the "Interactive" setting in xorg.conf (as expected). However, showing a "Compute Mode" doesn't make sense here.

@rawwar

rawwar commented Mar 9, 2021 •

Copy link
Copy Markdown
Contributor Author

The "Watchdog Enabled" status matches the "Interactive" setting in xorg.conf (as expected). However, showing a "Compute Mode" doesn't make sense here.

Should I show this information only on NT platform?

EDIT: Please correct me if I am wrong. Once can understand that the compute mode is WDDM if Watchdog is Enabled right? Do you think this information is redundant?

EDIT2: Wondering if the output is consistent with nvidia-smi's output on linux machine?

EDIT3: I was going through this link and understand that TCC is a driver for windows. So, I am assuming that you meant, printing Compute Mode on linux machines is not relevant. Am i correct?

@gmarkall

gmarkall commented Mar 9, 2021

Copy link
Copy Markdown
Member

The "Watchdog Enabled" status matches the "Interactive" setting in xorg.conf (as expected). However, showing a "Compute Mode" doesn't make sense here.

Should I show this information only on NT platform?

Yes, WDDM / TCC should be Windows-only.

EDIT: Please correct me if I am wrong. Once can understand that the compute mode is WDDM if Watchdog is Enabled right? Do you think this information is redundant?

I'm not sure whether you can have a watchdog in TCC mode - maybe you can. You can have a watchdog in Linux even though there is no WDDM / TCC. I would leave both the Compute Mode and Watchdog Enabled fields in.

EDIT2: Wondering if the output is consistent with nvidia-smi's output on linux machine?

It was, yes. Apologies for the omission.

EDIT3: I was going through this link and understand that TCC is a driver for windows. So, I am assuming that you meant, printing Compute Mode on linux machines is not relevant. Am i correct?

That is correct.

A couple of other small suggestions:

  • As part of this PR, could you fix the capitalisation of the other fields to match your additions (e.g. "compute capability" -> "Compute Capability", etc.)
  • Displaying "Watchdog: Enabled" or "Watchdog: Disabled" would be a bit nicer than "Watchdog Enabled: 0" (or "1").

@gmarkall gmarkall added 4 - Waiting on author Waiting for author to respond to review CUDA CUDA related issue/PR labels Mar 9, 2021
@rawwar

rawwar commented Mar 9, 2021

Copy link
Copy Markdown
Contributor Author

I updated the code with capitalisation, watchdog output and the following is the output now

In [3]: cuda.detect()
Found 1 CUDA devices
id 0    b'GeForce GTX 1660 Ti'                              [SUPPORTED]
                      Compute Capability: 7.5
                           PCI Device ID: 0
                              PCI Bus ID: 1
                                Watchdog: Enabled
                            Compute Mode: WDDM
             FP32/FP64 Performance Ratio: 32
Summary:
        1/1 devices are supported

@rawwar

rawwar commented Mar 9, 2021

Copy link
Copy Markdown
Contributor Author

My bad. Did not realize commit to my repo's branch would automatically trigger build

@gmarkall gmarkall added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 4 - Waiting on author Waiting for author to respond to review labels Mar 9, 2021
@gmarkall

gmarkall commented Mar 9, 2021

Copy link
Copy Markdown
Member

Thanks for the updates! Will re-review / re-test this tomorrow.

@gmarkall

Copy link
Copy Markdown
Member

From my Linux machine:

$ python -c "from numba import cuda; cuda.detect()"
Found 2 CUDA devices
id 0    b'NVIDIA Quadro RTX 8000'                              [SUPPORTED]
                      Compute Capability: 7.5
                           PCI Device ID: 0
                              PCI Bus ID: 21
                                Watchdog: Enabled
             FP32/FP64 Performance Ratio: 32
id 1    b'NVIDIA Quadro RTX 8000'                              [SUPPORTED]
                      Compute Capability: 7.5
                           PCI Device ID: 0
                              PCI Bus ID: 45
                                Watchdog: Disabled
             FP32/FP64 Performance Ratio: 32
Summary:
	2/2 devices are supported

Looks good, and agrees with nvidia-smi. Will check on Windows shortly.

@gmarkall

Copy link
Copy Markdown
Member

On Windows:

id 0      b'Quadro RTX 8000'                              [SUPPORTED]
                      Compute Capability: 7.5
                           PCI Device ID: 0
                              PCI Bus ID: 21
                                Watchdog: Disabled
                            Compute Mode: TCC
             FP32/FP64 Performance Ratio: 32
id 1      b'Quadro RTX 8000'                              [SUPPORTED]
                      Compute Capability: 7.5
                           PCI Device ID: 0
                              PCI Bus ID: 45
                                Watchdog: Enabled
                            Compute Mode: WDDM
             FP32/FP64 Performance Ratio: 32

Also looking good and agreeing with nvidia-smi.

@gmarkall gmarkall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your efforts and the updates here - this looks good to me!

@esc Could this have a buildfarm run please?

@gmarkall gmarkall added 4 - Waiting on CI Review etc done, waiting for CI to finish Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author labels Mar 10, 2021
@esc

esc commented Mar 10, 2021

Copy link
Copy Markdown
Member

BFID: numba_smoketest_cuda_yaml_23

@esc

esc commented Mar 10, 2021

Copy link
Copy Markdown
Member

BF passed

@esc esc added BuildFarm Passed For PRs that have been through the buildfarm and passed and removed 4 - Waiting on CI Review etc done, waiting for CI to finish Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm labels Mar 10, 2021
@gmarkall gmarkall added the 5 - Ready to merge Review and testing done, is ready to merge label Mar 10, 2021
@gmarkall

Copy link
Copy Markdown
Member

@esc Many thanks!

@rawwar rawwar closed this Mar 10, 2021
@rawwar rawwar reopened this Mar 10, 2021
@rawwar

rawwar commented Mar 10, 2021

Copy link
Copy Markdown
Contributor Author

Accidentally pressed close.

@sklam sklam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-approving to allow merge

@sklam
sklam merged commit 55e6831 into numba:master Mar 10, 2021
@rawwar
rawwar deleted the 3203_additional_info_in_cuda_detect branch March 10, 2021 22:41
@rawwar

rawwar commented Mar 26, 2021 •

Copy link
Copy Markdown
Contributor Author

closes #3203

@stuartarchibald

Copy link
Copy Markdown
Contributor

closes #3203

Thanks, will close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to merge Review and testing done, is ready to merge BuildFarm Passed For PRs that have been through the buildfarm and passed CUDA CUDA related issue/PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants