fmcquillan99 commented on issue #455: DL: Add new helper function for gpu_configuration
URL: https://github.com/apache/madlib/pull/455#issuecomment-550529308
```
SELECT * FROM madlib.gpu_configuration();
hostname | gpu_descr
----------+------------------------------------------------------------------------------------------
phoenix0 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability:
6.0
phoenix0 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability:
6.0
phoenix0 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability:
6.0
phoenix0 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability:
6.0
phoenix1 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability:
6.0
phoenix1 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability:
6.0
phoenix1 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability:
6.0
phoenix1 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability:
6.0
phoenix2 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability:
6.0
phoenix2 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability:
6.0
phoenix2 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability:
6.0
phoenix2 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability:
6.0
phoenix3 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability:
6.0
phoenix3 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability:
6.0
phoenix3 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability:
6.0
phoenix3 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability:
6.0
phoenix4 | device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability:
6.0
phoenix4 | device: 1, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:05.0, compute capability:
6.0
phoenix4 | device: 2, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:06.0, compute capability:
6.0
phoenix4 | device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability:
6.0
(20 rows)
```
OK
However the below does not work:
```
CREATE TABLE gpu_resources AS
SELECT * FROM madlib.gpu_configuration();
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause. Creating a NULL policy entry.
ERROR: plpy.SPIError: function cannot execute on segment because it issues a non-SELECT
statement (entry db 10.138.0.41:5432 pid=16886)
DETAIL:
Traceback (most recent call last):
PL/Python function "gpu_configuration", line 21, in <module>
with AOControl(False) and MinWarning("error"):
PL/Python function "gpu_configuration", line 154, in __enter__
PL/Python function "gpu_configuration"
SQL function "gpu_configuration" statement 1
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
|