Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Add half_t support for batch_dot. #353

Merged
piiswrong merged 5 commits intodmlc:masterfrom
eric-haibin-lin:batch_dot
Sep 12, 2018
Merged

Add half_t support for batch_dot. #353
piiswrong merged 5 commits intodmlc:masterfrom
eric-haibin-lin:batch_dot

Conversation

@eric-haibin-lin
Copy link
Copy Markdown
Member

@eric-haibin-lin eric-haibin-lin commented Aug 4, 2018

apache/mxnet#11796
@DickJC123 @szhengac @szha

crude benchmark

import mxnet as mx
a = mx.nd.ones((100,100,100), ctx=mx.gpu(), dtype='float16')
b = mx.nd.ones((100,100,100), ctx=mx.gpu(), dtype='float16')
for i in range(10):
    c = mx.nd.batch_dot(a,b)
mx.nd.waitall()
import time
begin = time.time()
for i in range(500):
    c = mx.nd.batch_dot(a,b)
mx.nd.waitall()
end = time.time()
print(end - begin)

Before:
python tests.py
0.9715321064

After:
python tests.py
0.0328528881073

Passed existing gpu batch_dot unit test in MXNet locally.

@szha
Copy link
Copy Markdown
Member

szha commented Aug 4, 2018

awesome!

@piiswrong piiswrong merged commit b32d191 into dmlc:master Sep 12, 2018
eric-haibin-lin added a commit to eric-haibin-lin/mshadow that referenced this pull request Sep 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants