Skip to content

Commit 02ee255

Browse files
committed
MLX delegate (part 1) (pytorch#17803)
Takes changes from pytorch#16718, but strips all ops (except addmm) and examples. Part2 will add back ops, and part 3 will add back examples.
1 parent a4f33a7 commit 02ee255

1 file changed

Lines changed: 84 additions & 1 deletion

File tree

CMakePresets.json

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"inherits": ["common"],
111111
"cacheVariables": {
112112
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/pybind.cmake",
113-
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0"
113+
"CMAKE_OSX_DEPLOYMENT_TARGET": "14.0"
114114
},
115115
"condition": {
116116
"type": "inList",
@@ -318,6 +318,43 @@
318318
"cacheVariables": {
319319
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/esp_baremetal.cmake"
320320
}
321+
},
322+
{
323+
"name": "mlx",
324+
"displayName": "Build MLX delegate",
325+
"inherits": ["common"],
326+
"cacheVariables": {
327+
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/mlx.cmake",
328+
"EXECUTORCH_ENABLE_LOGGING": "ON",
329+
"CMAKE_OSX_DEPLOYMENT_TARGET": "14.0"
330+
},
331+
"condition": {
332+
"lhs": "${hostSystemName}",
333+
"type": "equals",
334+
"rhs": "Darwin"
335+
}
336+
},
337+
{
338+
"name": "mlx-release",
339+
"displayName": "MLX delegate release build",
340+
"inherits": ["mlx"],
341+
"cacheVariables": {
342+
"CMAKE_BUILD_TYPE": "Release",
343+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/cmake-out",
344+
"ET_MLX_ENABLE_OP_LOGGING": "OFF",
345+
"ET_MIN_LOG_LEVEL": "Error"
346+
}
347+
},
348+
{
349+
"name": "mlx-debug",
350+
"displayName": "MLX delegate debug build with op logging",
351+
"inherits": ["mlx"],
352+
"cacheVariables": {
353+
"CMAKE_BUILD_TYPE": "Debug",
354+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/cmake-out",
355+
"ET_MLX_ENABLE_OP_LOGGING": "ON",
356+
"ET_MIN_LOG_LEVEL": "Debug"
357+
}
321358
}
322359
],
323360
"buildPresets": [
@@ -395,6 +432,24 @@
395432
"install"
396433
],
397434
"jobs": 0
435+
},
436+
{
437+
"name": "mlx-release-install",
438+
"displayName": "Build and install MLX delegate release artifacts",
439+
"configurePreset": "mlx-release",
440+
"targets": [
441+
"install"
442+
],
443+
"jobs": 0
444+
},
445+
{
446+
"name": "mlx-debug-install",
447+
"displayName": "Build and install MLX delegate debug artifacts",
448+
"configurePreset": "mlx-debug",
449+
"targets": [
450+
"install"
451+
],
452+
"jobs": 0
398453
}
399454
],
400455
"workflowPresets": [
@@ -509,6 +564,34 @@
509564
"name": "llm-metal-stats-install"
510565
}
511566
]
567+
},
568+
{
569+
"name": "mlx-release",
570+
"displayName": "Configure, build and install ExecuTorch MLX delegate",
571+
"steps": [
572+
{
573+
"type": "configure",
574+
"name": "mlx-release"
575+
},
576+
{
577+
"type": "build",
578+
"name": "mlx-release-install"
579+
}
580+
]
581+
},
582+
{
583+
"name": "mlx-debug",
584+
"displayName": "Configure, build and install ExecuTorch MLX delegate with op logging (Debug)",
585+
"steps": [
586+
{
587+
"type": "configure",
588+
"name": "mlx-debug"
589+
},
590+
{
591+
"type": "build",
592+
"name": "mlx-debug-install"
593+
}
594+
]
512595
}
513596
]
514597
}

0 commit comments

Comments
 (0)