support AMD

tests suite passes.