You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by GitBox <gi...@apache.org> on 2020/02/01 16:23:02 UTC
[GitHub] [singa] chrishkchris opened a new pull request #589: [WIP] hotfix
on dev branch (DNNL)
chrishkchris opened a new pull request #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589
Maybe there are some errors in DNNL needed to be fixed before functioning correctly.
I currently have solved a build error due to reassign of variable, so now I can built the code. The c test case test_singa.o and python mlp.py can now pass.
There are two more errors I encountered but I did not solve yet
1. mnist_cnn (after changing to cpu), it hangs.
2. test_operation.py
```
ubuntu@ip-172-31-24-48:~/singa/test/python$ python3 test_operation.py
.......................................Segmentation fault (core dumped)
```
----------------------------------------------------------------
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
[GitHub] [singa] dcslin commented on issue #589: [WIP] hotfix on dev branch
(DNNL)
Posted by GitBox <gi...@apache.org>.
dcslin commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581382061
Thus `test/python/test_api.py` is passing with no error, meaning C++ side should be fine. As for `test_operation.py`, I think there are some changes in `autograd.py`...
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: [WIP] hotfix on dev
branch (DNNL)
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581230051
> error: 'transform' is not a member of 'std'
> Did you include #include <algorithm>
no, I am now trying to add #include <algorithm> in batchnorm.h
----------------------------------------------------------------
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
[GitHub] [singa] nudles commented on issue #589: [WIP] hotfix on dev branch
(DNNL)
Posted by GitBox <gi...@apache.org>.
nudles commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581224816
```error: 'transform' is not a member of 'std'```
Did you include ```#include <algorithm> ```
----------------------------------------------------------------
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
[GitHub] [singa] dcslin commented on issue #589: [WIP] hotfix on dev branch
(DNNL)
Posted by GitBox <gi...@apache.org>.
dcslin commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581246121
HI @chrishkchris , there is error in TestPythonOperation.test_batchnorm2d_cpu. I am checking
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: [WIP] hotfix on dev
branch (DNNL)
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581241587
> Maybe there are some errors in DNNL needed to be fixed before functioning correctly.
> I currently have solved a build error due to reassign of variable, so now I can built the code. The c test case test_singa.o and python mlp.py can now pass.
> There are two more errors I encountered but I did not solve yet
>
> mnist_cnn (after changing to cpu), it hangs.
> test_operation.py
>
> ubuntu@ip-172-31-24-48:~/singa/test/python$ python3 test_operation.py
> .......................................Segmentation fault (core dumped)
@dcslin
I tried it in panda 5 using docker, it was the same as that in AWS without docker
```
root@04484c49d78c:~/singa/test/python# python3 test_operation.py
.......................................Segmentation fault (core dumped)
```
----------------------------------------------------------------
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
[GitHub] [singa] dcslin commented on issue #589: [WIP] hotfix on dev branch
(DNNL)
Posted by GitBox <gi...@apache.org>.
dcslin commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581381707
Hi @chris, some errors are due to enabling both USE DNNL and USE CUDNN. I fixed them in https://github.com/apache/singa/pull/590
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: bugfix on dev branch:
cpu batchnnorm num of args does not match
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: bugfix on dev branch: cpu batchnnorm num of args does not match
URL: https://github.com/apache/singa/pull/589#issuecomment-583813389
There is an new error in cpu batchnorm, where the number of output arguments do not match with the python autograd code. This PR simply fix the issue.
root@b8dfa5473dea:~/dcsysh/singa/test/python# python3 test_operation.py
................................................................E............................................................
======================================================================
ERROR: test_batchnorm2d_cpu (__main__.TestPythonOperation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_operation.py", line 286, in test_batchnorm2d_cpu
y = batchnorm_0(cpu_input_tensor)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1502, in __call__
self.running_var,
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1581, in batchnorm_2d
return _BatchNorm2d(handle, running_mean, running_var)(x, scale, bias)[0]
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 244, in __call__
return self._do_forward(*xs)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 294, in _do_forward
ys = self.forward(*xs)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1532, in forward
self.running_var)
ValueError: too many values to unpack (expected 3)
----------------------------------------------------------------------
Ran 125 tests in 0.766s
FAILED (errors=1)
root@b8dfa5473dea:~/dcsysh/singa/examples/autograd# python3 resnet.py
Start intialization............
0%| | 0/100 [00:26<?, ?it/s]
Traceback (most recent call last):
File "resnet.py", line 278, in <module>
x = model(tx)
File "resnet.py", line 179, in __call__
x = self.bn1(x)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1502, in __call__
self.running_var,
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1581, in batchnorm_2d
return _BatchNorm2d(handle, running_mean, running_var)(x, scale, bias)[0]
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 244, in __call__
return self._do_forward(*xs)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 294, in _do_forward
ys = self.forward(*xs)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1532, in forward
self.running_var)
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: [WIP] hotfix on dev
branch (DNNL)
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581384529
> Thus test/python/test_api.py is passing with no error, meaning C++ side should be fine. As for test_operation.py, I think there are some changes in autograd.py...
@dcslin great! thank you so much!
@nudles merging this PR #589 and PR #590 will fix two errors, I will re-test after merging the two bug fix PRs.
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: [WIP] hotfix on dev
branch (DNNL)
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581350690
> HI @chrishkchris , there is error in TestPythonOperation.test_batchnorm2d_cpu. I am checking
@dcslin
the batchnorm2d_gpu also has error of dnnl, seems due to the control logic
```
ubuntu@ip-172-31-35-63:~/singa/test/python$ python3 test_operation.py TestPythonOperation.test_batchnorm2d_gpu
terminate called after throwing an instance of 'dnnl::error'
what(): attempt to use uninitialized object
Aborted (core dumped)
```
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: [WIP] hotfix on dev
branch (DNNL)
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581236705
> error: 'transform' is not a member of 'std'
> Did you include #include
>
> no, I am now trying to add #include <algorithm> in batchnorm.h
After
> @dcslin when I set up the docker container in panda5, the following error is encountered.
> [ 51%] Building CXX object src/CMakeFiles/singa_objects.dir/model/metric/accuracy.cc.o
> [ 51%] Building CXX object src/CMakeFiles/singa_objects.dir/model/updater/local_updater.cc.o
> [ 52%] Building CXX object src/CMakeFiles/singa_objects.dir/model/updater/updater.cc.o
> [ 52%] Building CXX object src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o
> /root/singa/src/model/operation/batchnorm.cc: In constructor 'singa::CudnnBatchNormHandle::CudnnBatchNormHandle(float, const singa::Tensor&)':
> /root/singa/src/model/operation/batchnorm.cc:246:12: error: 'transform' is not a member of 'std'
> std::transform(alg.begin(), alg.end(), alg.begin(), toupper);
> ^~~~~~~~~
> src/CMakeFiles/singa_objects.dir/build.make:972: recipe for target 'src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o' failed
> make[2]: *** [src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o] Error 1
> make[1]: *** [src/CMakeFiles/singa_objects.dir/all] Error 2
> CMakeFiles/Makefile2:131: recipe for target 'src/CMakeFiles/singa_objects.dir/all' failed
> make: *** [all] Error 2
> Makefile:129: recipe for target 'all' failed
> The command '/bin/sh -c cd $HOME/singa/build && make && make install' returned a non-zero code: 2
>
> @dcslin @nudles Sorry, when I checked the dockerfile, I found that the dockerfile clones the master branch to build the code. So this error is unrelated to the dev branch. This first comment of this PR was not using docker so it reflects the dev branch. Sorry for confusion.
@dcslin @nudles so the problem of the docker in dev branch was that it used DNNL and the master branch code. I will change it by locally adding "git checkout dev" for the debug in this PR.
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: [WIP] hotfix on dev
branch (DNNL)
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581216510
@dcslin when I set up the docker container in panda5, the following error is encountered.
```
[ 51%] Building CXX object src/CMakeFiles/singa_objects.dir/model/metric/accuracy.cc.o
[ 51%] Building CXX object src/CMakeFiles/singa_objects.dir/model/updater/local_updater.cc.o
[ 52%] Building CXX object src/CMakeFiles/singa_objects.dir/model/updater/updater.cc.o
[ 52%] Building CXX object src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o
/root/singa/src/model/operation/batchnorm.cc: In constructor 'singa::CudnnBatchNormHandle::CudnnBatchNormHandle(float, const singa::Tensor&)':
/root/singa/src/model/operation/batchnorm.cc:246:12: error: 'transform' is not a member of 'std'
std::transform(alg.begin(), alg.end(), alg.begin(), toupper);
^~~~~~~~~
src/CMakeFiles/singa_objects.dir/build.make:972: recipe for target 'src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o' failed
make[2]: *** [src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o] Error 1
make[1]: *** [src/CMakeFiles/singa_objects.dir/all] Error 2
CMakeFiles/Makefile2:131: recipe for target 'src/CMakeFiles/singa_objects.dir/all' failed
make: *** [all] Error 2
Makefile:129: recipe for target 'all' failed
The command '/bin/sh -c cd $HOME/singa/build && make && make install' returned a non-zero code: 2
```
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris edited a comment on issue #589: [WIP] hotfix
on dev branch (DNNL)
Posted by GitBox <gi...@apache.org>.
chrishkchris edited a comment on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581230051
> error: 'transform' is not a member of 'std'
> Did you include #include <algorithm>
no, I am now trying to add `#include <algorithm>` in batchnorm.h
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris closed pull request #589: hotfix on dev branch
(remove of duplicate variable)
Posted by GitBox <gi...@apache.org>.
chrishkchris closed pull request #589: hotfix on dev branch (remove of duplicate variable)
URL: https://github.com/apache/singa/pull/589
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris edited a comment on issue #589: bugfix on dev
branch: cpu batchnnorm num of args does not match
Posted by GitBox <gi...@apache.org>.
chrishkchris edited a comment on issue #589: bugfix on dev branch: cpu batchnnorm num of args does not match
URL: https://github.com/apache/singa/pull/589#issuecomment-583813389
There is an new error in cpu batchnorm, where the number of output arguments do not match with the python autograd code. This PR simply fix the issue.
```
root@b8dfa5473dea:~/dcsysh/singa/test/python# python3 test_operation.py
................................................................E............................................................
======================================================================
ERROR: test_batchnorm2d_cpu (__main__.TestPythonOperation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_operation.py", line 286, in test_batchnorm2d_cpu
y = batchnorm_0(cpu_input_tensor)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1502, in __call__
self.running_var,
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1581, in batchnorm_2d
return _BatchNorm2d(handle, running_mean, running_var)(x, scale, bias)[0]
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 244, in __call__
return self._do_forward(*xs)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 294, in _do_forward
ys = self.forward(*xs)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1532, in forward
self.running_var)
ValueError: too many values to unpack (expected 3)
----------------------------------------------------------------------
Ran 125 tests in 0.766s
FAILED (errors=1)
root@b8dfa5473dea:~/dcsysh/singa/examples/autograd# python3 resnet.py
Start intialization............
0%| | 0/100 [00:26<?, ?it/s]
Traceback (most recent call last):
File "resnet.py", line 278, in <module>
x = model(tx)
File "resnet.py", line 179, in __call__
x = self.bn1(x)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1502, in __call__
self.running_var,
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1581, in batchnorm_2d
return _BatchNorm2d(handle, running_mean, running_var)(x, scale, bias)[0]
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 244, in __call__
return self._do_forward(*xs)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 294, in _do_forward
ys = self.forward(*xs)
File "/root/dcsysh/singa/build/python/singa/autograd.py", line 1532, in forward
self.running_var)
```
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: [WIP] hotfix on dev
branch (DNNL)
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: [WIP] hotfix on dev branch (DNNL)
URL: https://github.com/apache/singa/pull/589#issuecomment-581235041
> @dcslin when I set up the docker container in panda5, the following error is encountered.
> [ 51%] Building CXX object src/CMakeFiles/singa_objects.dir/model/metric/accuracy.cc.o
> [ 51%] Building CXX object src/CMakeFiles/singa_objects.dir/model/updater/local_updater.cc.o
> [ 52%] Building CXX object src/CMakeFiles/singa_objects.dir/model/updater/updater.cc.o
> [ 52%] Building CXX object src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o
> /root/singa/src/model/operation/batchnorm.cc: In constructor 'singa::CudnnBatchNormHandle::CudnnBatchNormHandle(float, const singa::Tensor&)':
> /root/singa/src/model/operation/batchnorm.cc:246:12: error: 'transform' is not a member of 'std'
> std::transform(alg.begin(), alg.end(), alg.begin(), toupper);
> ^~~~~~~~~
> src/CMakeFiles/singa_objects.dir/build.make:972: recipe for target 'src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o' failed
> make[2]: *** [src/CMakeFiles/singa_objects.dir/model/operation/batchnorm.cc.o] Error 1
> make[1]: *** [src/CMakeFiles/singa_objects.dir/all] Error 2
> CMakeFiles/Makefile2:131: recipe for target 'src/CMakeFiles/singa_objects.dir/all' failed
> make: *** [all] Error 2
> Makefile:129: recipe for target 'all' failed
> The command '/bin/sh -c cd $HOME/singa/build && make && make install' returned a non-zero code: 2
@dcslin @nudles Sorry, when I checked the dockerfile, I found that the dockerfile clones the master branch to build the code. So this error is unrelated to the dev branch. This first comment of this PR was not using docker so it reflects the dev branch. Sorry for confusion.
----------------------------------------------------------------
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
[GitHub] [singa] chrishkchris commented on issue #589: hotfix on dev branch
(remove of duplicate variable)
Posted by GitBox <gi...@apache.org>.
chrishkchris commented on issue #589: hotfix on dev branch (remove of duplicate variable)
URL: https://github.com/apache/singa/pull/589#issuecomment-581425391
the build error due to duplicate of variable has been resolved in #590, and hence this PR can be closed. I will retest the code.
----------------------------------------------------------------
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