singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] nudles commented on a change in pull request #660: Update test cases for both cpu and gpu
Date Wed, 08 Apr 2020 01:25:38 GMT
nudles commented on a change in pull request #660: Update test cases for both cpu and gpu
URL: https://github.com/apache/singa/pull/660#discussion_r405204971
 
 

 ##########
 File path: test/python/test_api.py
 ##########
 @@ -201,43 +201,47 @@ def _run_testing(x_0, s_0, b_0, rm_0, rv_0, m_0=0.1):
 
     def test_softmax_api(self):
 
 Review comment:
   in the future, we can improve it as follows
   ```python
   def softmax_api_test(dev)
   
   def test_softmax_api_cpu(self)
      cpu = ...
      softmax_api_test(cpu)
   
   @unittestskip(...)
   def test_softmax_api_gpu(self)
      gpu = ...
      softmax_api_test(gpu)
   ```
   In this way, the unittest will report if the error is from cpu test or gpu test. Otherwise,
it will only report that the softmax_api has error.

----------------------------------------------------------------
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

Mime
View raw message