Fixed gpu sanity tests

Refactored gpu perf tests and fixed sanity tests.