AMD support

This is a work in progress PR