Feature/amd support

See commit messages for further explanation.