rocmarchive / realcaffe2

The repo is obsolete. Use at your own risk.
https://github.com/pytorch/pytorch
Apache License 2.0
12 stars 2 forks source link

Add HIP device support in the python based operator tests #62

Closed petrex closed 6 years ago

petrex commented 6 years ago

We need to add hip device support int the following 3 op test.

==================================== ERRORS ==================================== _ ERROR collecting python/data_parallel_model_test.py __ python/data_parallel_model_test.py:516: in @unittest.skipIf(workspace.NumCudaDevices() < 2, "Need at least 2 GPUs.") E AttributeError: 'module' object has no attribute 'NumCudaDevices' ------------------------------- Captured stdout -------------------------------- Ignoring @/caffe2/caffe2/contrib/nccl:nccl_ops as it is not a valid file. Ignoring @/caffe2/caffe2/contrib/gloo:gloo_ops as it is not a valid file. Ignoring @/caffe2/caffe2/contrib/gloo:gloo_ops_gpu as it is not a valid file. Ignoring @/caffe2/caffe2/distributed:file_store_handler_ops as it is not a valid file. ____ ERROR collecting python/gradient_check_test.py ____ python/gradient_check_test.py:41: in if workspace.has_gpu_support and workspace.NumCudaDevices() > 0: E AttributeError: 'module' object has no attribute 'NumCudaDevices' _ ERROR collecting python/operator_test/load_save_test.py __ python/operator_test/load_save_test.py:34: in max_gpuid = workspace.NumCudaDevices() - 1 E AttributeError: 'module' object has no attribute 'NumCudaDevices'

petrex commented 6 years ago

@rohithkrn I remember you had some prior work in this area. Can you take care of this 3 python tests and create a PR?

rohithkrn commented 6 years ago

@petrex I have fixed these tests and few other tests which has cuda paths. Will create a PR soon. But I do not know nccl counterpart in HIP which appears in data_parallel_model.py

petrex commented 6 years ago

thanks ! nccl counterpart for HIP would be rccl . For now let's leave it as is.

petrex commented 6 years ago

77