Adding AMD support

It closes #109.