Allow import without the gpu back-end.

needed for docgen.
Merge pull request #1893 from nouiz/import

Allow import without the gpu back-end.