Add AMD support

This adds AMD support reverting to variable in global scope if not on AMD environment.