Add AMD support.

Closes gh-3. Closes gh-4.