Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

test_nccl.py 457 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  1. import sys
  2. import unittest
  3. import caffe
  4. class TestNCCL(unittest.TestCase):
  5. def test_newuid(self):
  6. """
  7. Test that NCCL uids are of the proper type
  8. according to python version
  9. """
  10. if caffe.has_nccl():
  11. uid = caffe.NCCL.new_uid()
  12. if sys.version_info.major >= 3:
  13. self.assertTrue(isinstance(uid, bytes))
  14. else:
  15. self.assertTrue(isinstance(uid, str))
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...