from nose.plugins.attrib import attr

gpu = attr('gpu')
cudnn = attr('gpu', 'cudnn')

from nose.plugins import attrib

gpu = attrib.attr('gpu')
cudnn = attrib.attr('gpu', 'cudnn')

Fix module import of testing.attr