I managed to extract the .run file from NVIDIA using ./<cuda filename>.run — tar mxvf
The samples are there.
It also made it possible to install CUDA using these .run files (which is preferable, since it uses the standard path structure + has an additional performance patch which is not included in the .deb installation).
The problem with installing CUDA 8.0 on Ubuntu 17.04 was that InstallUtils.pm was not present in /usr/lib/x86_64-linux-gnu/perl-base/
It is present, though, in the .run file from nvidia — so you just have to copy it over to perl-base and run the nvidia .run file (skipping the driver installation, and installing only the toolkit and samples).