- (BOOL)available {
#if !defined(__APPLE__)
return false;
-#elif TARGET_IPHONE_SIMULATOR
- // TODO[T90135707]: Enable Metal on iOS Simulators
- return false;
#elif TARGET_OS_IPHONE
if (!MPSSupportsMTLDevice(_device)) {
return false;
if ([UIDevice currentDevice].systemVersion.floatValue < 11.0) {
return false;
}
- if (![_device supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily3_v2]) {
- return false;
- }
#elif TARGET_OS_MAC
if (!MPSSupportsMTLDevice(_device)) {
return false;
REG_TEST("test_hardtanh_", test_hardtanh_);
REG_TEST("test_hardtanh", test_hardtanh);
REG_TEST("test_reshape", test_reshape);
+ REG_TEST("test_chunk", test_chunk);
+ REG_TEST("test_chunk3", test_chunk3);
+ REG_TEST("test_reflection_pad2d", test_reflection_pad2d);
+#if !TARGET_IPHONE_SIMULATOR
REG_TEST("test_mean_dim", test_mean_dim);
REG_TEST("test_mean_dim2", test_mean_dim2);
REG_TEST("test_mean_dim3", test_mean_dim3);
- REG_TEST("test_chunk", test_chunk);
REG_TEST("test_chunk2", test_chunk2);
- REG_TEST("test_chunk3", test_chunk3);
- REG_TEST("test_reflection_pad2d", test_reflection_pad2d);
+#endif
}
- (NSDictionary*)tests {