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

print consistent tensor data #5902

Merged
merged 26 commits into from
Aug 17, 2021
Merged

print consistent tensor data #5902

merged 26 commits into from
Aug 17, 2021

Conversation

liufengwei0103
Copy link
Contributor

@liufengwei0103 liufengwei0103 commented Aug 16, 2021

print consistent tensor data
placement = flow.placement("cuda", {0: range(2)})
1.tensor = flow.ones((10, 10), placement=placement, sbp=[flow.sbp.split(0)])
截屏2021-08-16 下午2 32 10
2.tensor = flow.ones((100, 100), placement=placement, sbp=[flow.sbp.split(0)])
截屏2021-08-16 下午2 42 27
3.tensor = flow.ones((0, 100), placement=placement, sbp=[flow.sbp.split(0)])
截屏2021-08-16 下午2 55 31

python/oneflow/framework/tensor_str.py Outdated Show resolved Hide resolved
python/oneflow/framework/tensor_str.py Outdated Show resolved Hide resolved
python/oneflow/framework/tensor_str.py Outdated Show resolved Hide resolved
python/oneflow/framework/tensor_str.py Outdated Show resolved Hide resolved
python/oneflow/framework/tensor_str.py Outdated Show resolved Hide resolved
python/oneflow/framework/tensor_str.py Outdated Show resolved Hide resolved
…nt_tensor_str

Conflicts:
	python/oneflow/framework/tensor_str.py
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 17, 2021 08:40
@liufengwei0103 liufengwei0103 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 17, 2021 09:52
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 17, 2021 10:13
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 17, 2021 11:32
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 17, 2021 12:26
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 17, 2021 13:27
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 139.8ms (= 6989.2ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.1ms (= 6403.2ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.09 (= 139.8ms / 128.1ms)

PyTorch resnet50 time: 85.3ms (= 4266.3ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.5ms (= 3723.1ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.15 (= 85.3ms / 74.5ms)

PyTorch resnet50 time: 58.1ms (= 2905.4ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 48.4ms (= 2417.7ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.20 (= 58.1ms / 48.4ms)

PyTorch resnet50 time: 47.1ms (= 2353.1ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 41.3ms (= 2063.3ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.14 (= 47.1ms / 41.3ms)

PyTorch resnet50 time: 43.3ms (= 2163.4ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 43.9ms (= 2197.1ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 0.98 (= 43.3ms / 43.9ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review August 17, 2021 14:28
@oneflow-ci-bot oneflow-ci-bot merged commit ebb13f2 into master Aug 17, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the consistent_tensor_str branch August 17, 2021 14:28
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.

None yet

3 participants