Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel unit tests (Step 1, refactor existing unit tests) #3632

Merged
merged 79 commits into from
Oct 3, 2020

Conversation

jackalcooper
Copy link
Collaborator

@jackalcooper jackalcooper commented Sep 30, 2020

  • 让每个脚本都可以独立运行
  • 将脚本按照官方文档推荐的规范修改 https://docs.python.org/3/library/unittest.html
  • oneflow 实际上不存在单元测试和集成测试的区别,因为不存在单独跑一个op的测试,op都是在网络中测试的。

@jackalcooper jackalcooper changed the title Parallel unit tests Parallel unit tests (Step 1, refactor existing unit tests) Sep 30, 2020
@jackalcooper jackalcooper marked this pull request as ready for review September 30, 2020 10:46
@jackalcooper
Copy link
Collaborator Author

note:
设置 CUDA_VISIBLE_DEVICES 之后,tf 会卡住,不知道为什么

@jackalcooper
Copy link
Collaborator Author

note:
实现并行还需要解决:

  • 让脚本知道当前空闲的是哪一张卡
  • 设置 CUDA_VISIBLE_DEVICES,tf 不卡住

所以这个 PR 先合并对脚本的修改

@jackalcooper jackalcooper marked this pull request as draft September 30, 2020 15:34
@oneflow-ci-bot oneflow-ci-bot merged commit 789e80b into master Oct 3, 2020
@oneflow-ci-bot oneflow-ci-bot deleted the parallel_unit_tests branch October 3, 2020 18:13
liujuncheng pushed a commit that referenced this pull request Jun 3, 2021
* add classes for different test base class

* add export

* rm old main files

* fix

* fix class name

* check in changes of tests

* fix else

* fix bugs

* fix order

* better naming

* update ci script

* fix import unittest

* add --failfast

* filter by card num

* fix typo

* update ci script

* dont set CUDA_VISIBLE_DEVICES

* use skip unless

* add OneGpuTestCase

* fix typo

* shorter reason

* fix class

* fix typo

* skip test_train_consistent for now

* add tearDown

* fix setup

* rm todo

* skip TestImageResize

* fix for pure cpu

* skip TestImageTargetResize

* fix typo

* rename

* mv demo

* rm readme

* rename

* rename cases

* add --verbose

* rename

* address reviews

* fix export

* minor fix

* fix export

* fix skips

* more renames

* rename

* rename class

* rm gpu

* rename num in scripts

* skip resize img

* fix sys env

* fix dynamic reshape

* fix dynamic reshape

* fix skip msg

* rm num_gpus

* address review

* address reviews

* rm class

* update decorator

* fix inden

* fix typo

* replace class with decorator

* fix

* refine

* fix decorator

* mv code

* add more decorators

* add ONEFLOW_TEST_DEVICE_NUM=1

* fix typo

* fix typo

* fix name

* fix skip msg

* use decorators in scripts

* larger rol for xla ln

Co-authored-by: tsai <caishenghang@oneflow.org>
Co-authored-by: oneflow-bot <69100618+oneflow-bot@users.noreply.github.com>
Former-commit-id: 789e80b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants