Add GPU-related helper functions to test_common.ml