pyobjc-framework-MLCompute 10.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
MLCompute/__init__.py ADDED
@@ -0,0 +1,70 @@
1
+ """
2
+ Python mapping for the MLCompute framework.
3
+
4
+ This module does not contain docstrings for the wrapped code, check Apple's
5
+ documentation for details on how to use these functions and classes.
6
+ """
7
+
8
+
9
+ def _setup():
10
+ import sys
11
+
12
+ import Foundation
13
+ import objc
14
+ from . import _metadata
15
+
16
+ dir_func, getattr_func = objc.createFrameworkDirAndGetattr(
17
+ name="MLCompute",
18
+ frameworkIdentifier="com.apple.MLCompute",
19
+ frameworkPath=objc.pathForFramework(
20
+ "/System/Library/Frameworks/MLCompute.framework"
21
+ ),
22
+ globals_dict=globals(),
23
+ inline_list=None,
24
+ parents=(Foundation,),
25
+ metadict=_metadata.__dict__,
26
+ )
27
+
28
+ globals()["__dir__"] = dir_func
29
+ globals()["__getattr__"] = getattr_func
30
+
31
+ for cls, sel in (
32
+ ("MLCTensorParameter", b"init"),
33
+ ("MLCTensorParameter", b"new"),
34
+ ("MLCTensorOptimizerDeviceData", b"init"),
35
+ ("MLCTensorOptimizerDeviceData", b"new"),
36
+ ("MLCTensor", b"init"),
37
+ ("MLCTensor", b"new"),
38
+ ("MLCLSTMDescriptor", b"init"),
39
+ ("MLCLSTMDescriptor", b"new"),
40
+ ("MLCActivationDescriptor", b"init"),
41
+ ("MLCActivationDescriptor", b"new"),
42
+ ("MLCMatMulDescriptor", b"init"),
43
+ ("MLCMatMulDescriptor", b"new"),
44
+ ("MLCEmbeddingDescriptor", b"init"),
45
+ ("MLCEmbeddingDescriptor", b"new"),
46
+ ("MLCInferenceGraph", b"init"),
47
+ ("MLCInferenceGraph", b"new"),
48
+ ("MLCLayer", b"init"),
49
+ ("MLCLayer", b"new"),
50
+ ("MLCTensorDescriptor", b"init"),
51
+ ("MLCTensorDescriptor", b"new"),
52
+ ("MLCYOLOLossDescriptor", b"init"),
53
+ ("MLCYOLOLossDescriptor", b"new"),
54
+ ("MLCTensorData", b"init"),
55
+ ("MLCTensorData", b"new"),
56
+ ("MLCPoolingDescriptor", b"init"),
57
+ ("MLCPoolingDescriptor", b"new"),
58
+ ("MLCOptimizer", b"init"),
59
+ ("MLCOptimizer", b"new"),
60
+ ("MLCLossDescriptor", b"init"),
61
+ ("MLCLossDescriptor", b"new"),
62
+ ("MLCMultiheadAttentionDescriptor", b"init"),
63
+ ("MLCMultiheadAttentionDescriptor", b"new"),
64
+ ):
65
+ objc.registerUnavailableMethod(cls, sel)
66
+
67
+ del sys.modules["MLCompute._metadata"]
68
+
69
+
70
+ globals().pop("_setup")()
MLCompute/_metadata.py ADDED
@@ -0,0 +1,573 @@
1
+ # This file is generated by objective.metadata
2
+ #
3
+ # Last update: Sat May 18 09:31:20 2024
4
+ #
5
+ # flake8: noqa
6
+
7
+ import objc, sys
8
+ from typing import NewType
9
+
10
+ if sys.maxsize > 2**32:
11
+
12
+ def sel32or64(a, b):
13
+ return b
14
+
15
+ else:
16
+
17
+ def sel32or64(a, b):
18
+ return a
19
+
20
+
21
+ if objc.arch == "arm64":
22
+
23
+ def selAorI(a, b):
24
+ return a
25
+
26
+ else:
27
+
28
+ def selAorI(a, b):
29
+ return b
30
+
31
+
32
+ misc = {}
33
+ constants = """$$"""
34
+ enums = """$MLCActivationTypeAbsolute@6$MLCActivationTypeCELU@13$MLCActivationTypeClamp@20$MLCActivationTypeELU@9$MLCActivationTypeGELU@18$MLCActivationTypeHardShrink@14$MLCActivationTypeHardSigmoid@4$MLCActivationTypeHardSwish@19$MLCActivationTypeLinear@2$MLCActivationTypeLogSigmoid@11$MLCActivationTypeNone@0$MLCActivationTypeReLU@1$MLCActivationTypeReLUN@10$MLCActivationTypeSELU@12$MLCActivationTypeSigmoid@3$MLCActivationTypeSoftPlus@7$MLCActivationTypeSoftShrink@15$MLCActivationTypeSoftSign@8$MLCActivationTypeTanh@5$MLCActivationTypeTanhShrink@16$MLCActivationTypeThreshold@17$MLCArithmeticOperationAcos@13$MLCArithmeticOperationAcosh@19$MLCArithmeticOperationAdd@0$MLCArithmeticOperationAsin@12$MLCArithmeticOperationAsinh@18$MLCArithmeticOperationAtan@14$MLCArithmeticOperationAtanh@20$MLCArithmeticOperationCeil@6$MLCArithmeticOperationCos@10$MLCArithmeticOperationCosh@16$MLCArithmeticOperationDivide@3$MLCArithmeticOperationDivideNoNaN@27$MLCArithmeticOperationExp@22$MLCArithmeticOperationExp2@23$MLCArithmeticOperationFloor@4$MLCArithmeticOperationLog@24$MLCArithmeticOperationLog2@25$MLCArithmeticOperationMax@29$MLCArithmeticOperationMin@28$MLCArithmeticOperationMultiply@2$MLCArithmeticOperationMultiplyNoNaN@26$MLCArithmeticOperationPow@21$MLCArithmeticOperationRound@5$MLCArithmeticOperationRsqrt@8$MLCArithmeticOperationSin@9$MLCArithmeticOperationSinh@15$MLCArithmeticOperationSqrt@7$MLCArithmeticOperationSubtract@1$MLCArithmeticOperationTan@11$MLCArithmeticOperationTanh@17$MLCComparisonOperationEqual@0$MLCComparisonOperationGreater@3$MLCComparisonOperationGreaterOrEqual@5$MLCComparisonOperationLess@2$MLCComparisonOperationLessOrEqual@4$MLCComparisonOperationLogicalAND@6$MLCComparisonOperationLogicalNAND@9$MLCComparisonOperationLogicalNOR@10$MLCComparisonOperationLogicalNOT@8$MLCComparisonOperationLogicalOR@7$MLCComparisonOperationLogicalXOR@11$MLCComparisonOperationNotEqual@1$MLCConvolutionTypeDepthwise@2$MLCConvolutionTypeStandard@0$MLCConvolutionTypeTransposed@1$MLCDataTypeBoolean@4$MLCDataTypeFloat16@3$MLCDataTypeFloat32@1$MLCDataTypeInt32@7$MLCDataTypeInt64@5$MLCDataTypeInt8@8$MLCDataTypeInvalid@0$MLCDataTypeUInt8@9$MLCDeviceTypeANE@3$MLCDeviceTypeAny@2$MLCDeviceTypeCPU@0$MLCDeviceTypeGPU@1$MLCExecutionOptionsForwardForInference@8$MLCExecutionOptionsForwardOnlyForInference@8$MLCExecutionOptionsNone@0$MLCExecutionOptionsPerLayerProfiling@16$MLCExecutionOptionsProfiling@4$MLCExecutionOptionsSkipWritingInputDataToDevice@1$MLCExecutionOptionsSynchronous@2$MLCGradientClippingTypeByGlobalNorm@2$MLCGradientClippingTypeByNorm@1$MLCGradientClippingTypeByValue@0$MLCGraphCompilationOptionsComputeAllGradients@8$MLCGraphCompilationOptionsDebugLayers@1$MLCGraphCompilationOptionsDisableLayerFusion@2$MLCGraphCompilationOptionsLinkGraphs@4$MLCGraphCompilationOptionsNone@0$MLCLSTMResultModeOutput@0$MLCLSTMResultModeOutputAndStates@1$MLCLossTypeCategoricalCrossEntropy@4$MLCLossTypeCosineDistance@7$MLCLossTypeHinge@5$MLCLossTypeHuber@6$MLCLossTypeLog@8$MLCLossTypeMeanAbsoluteError@0$MLCLossTypeMeanSquaredError@1$MLCLossTypeSigmoidCrossEntropy@3$MLCLossTypeSoftmaxCrossEntropy@2$MLCPaddingPolicySame@0$MLCPaddingPolicyUsePaddingSize@2$MLCPaddingPolicyValid@1$MLCPaddingTypeConstant@3$MLCPaddingTypeReflect@1$MLCPaddingTypeSymmetric@2$MLCPaddingTypeZero@0$MLCPoolingTypeAverage@2$MLCPoolingTypeL2Norm@3$MLCPoolingTypeMax@1$MLCRandomInitializerTypeGlorotUniform@2$MLCRandomInitializerTypeInvalid@0$MLCRandomInitializerTypeUniform@1$MLCRandomInitializerTypeXavier@3$MLCReductionTypeAll@9$MLCReductionTypeAny@8$MLCReductionTypeArgMax@5$MLCReductionTypeArgMin@6$MLCReductionTypeL1Norm@7$MLCReductionTypeMax@3$MLCReductionTypeMean@2$MLCReductionTypeMin@4$MLCReductionTypeNone@0$MLCReductionTypeSum@1$MLCRegularizationTypeL1@1$MLCRegularizationTypeL2@2$MLCRegularizationTypeNone@0$MLCSampleModeLinear@1$MLCSampleModeNearest@0$MLCSoftmaxOperationLogSoftmax@1$MLCSoftmaxOperationSoftmax@0$"""
35
+ misc.update(
36
+ {
37
+ "MLCSampleMode": NewType("MLCSampleMode", int),
38
+ "MLCArithmeticOperation": NewType("MLCArithmeticOperation", int),
39
+ "MLCExecutionOptions": NewType("MLCExecutionOptions", int),
40
+ "MLCReductionType": NewType("MLCReductionType", int),
41
+ "MLCComparisonOperation": NewType("MLCComparisonOperation", int),
42
+ "MLCGradientClippingType": NewType("MLCGradientClippingType", int),
43
+ "MLCRegularizationType": NewType("MLCRegularizationType", int),
44
+ "MLCDeviceType": NewType("MLCDeviceType", int),
45
+ "MLCLossType": NewType("MLCLossType", int),
46
+ "MLCPoolingType": NewType("MLCPoolingType", int),
47
+ "MLCConvolutionType": NewType("MLCConvolutionType", int),
48
+ "MLCPaddingPolicy": NewType("MLCPaddingPolicy", int),
49
+ "MLCRandomInitializerType": NewType("MLCRandomInitializerType", int),
50
+ "MLCLSTMResultMode": NewType("MLCLSTMResultMode", int),
51
+ "MLCDataType": NewType("MLCDataType", int),
52
+ "MLCActivationType": NewType("MLCActivationType", int),
53
+ "MLCSoftmaxOperation": NewType("MLCSoftmaxOperation", int),
54
+ "MLCPaddingType": NewType("MLCPaddingType", int),
55
+ "MLCGraphCompilationOptions": NewType("MLCGraphCompilationOptions", int),
56
+ }
57
+ )
58
+ misc.update({})
59
+ misc.update({})
60
+ functions = {
61
+ "MLCPaddingTypeDebugDescription": (b"@i",),
62
+ "MLCReductionTypeDebugDescription": (b"@i",),
63
+ "MLCLossTypeDebugDescription": (b"@i",),
64
+ "MLCGradientClippingTypeDebugDescription": (b"@i",),
65
+ "MLCComparisonOperationDebugDescription": (b"@i",),
66
+ "MLCLSTMResultModeDebugDescription": (b"@Q",),
67
+ "MLCPoolingTypeDebugDescription": (b"@i",),
68
+ "MLCActivationTypeDebugDescription": (b"@i",),
69
+ "MLCPaddingPolicyDebugDescription": (b"@i",),
70
+ "MLCConvolutionTypeDebugDescription": (b"@i",),
71
+ "MLCSoftmaxOperationDebugDescription": (b"@i",),
72
+ "MLCArithmeticOperationDebugDescription": (b"@i",),
73
+ "MLCSampleModeDebugDescription": (b"@i",),
74
+ }
75
+ r = objc.registerMetaDataForSelector
76
+ objc._updatingMetadata(True)
77
+ try:
78
+ r(
79
+ b"MLCAdamOptimizer",
80
+ b"optimizerWithDescriptor:beta1:beta2:epsilon:usesAMSGrad:timeStep:",
81
+ {"arguments": {6: {"type": b"Z"}}},
82
+ )
83
+ r(b"MLCAdamOptimizer", b"usesAMSGrad", {"retval": {"type": b"Z"}})
84
+ r(
85
+ b"MLCAdamWOptimizer",
86
+ b"optimizerWithDescriptor:beta1:beta2:epsilon:usesAMSGrad:timeStep:",
87
+ {"arguments": {6: {"type": b"Z"}}},
88
+ )
89
+ r(b"MLCAdamWOptimizer", b"usesAMSGrad", {"retval": {"type": b"Z"}})
90
+ r(
91
+ b"MLCConvolutionDescriptor",
92
+ b"isConvolutionTranspose",
93
+ {"retval": {"type": b"Z"}},
94
+ )
95
+ r(
96
+ b"MLCConvolutionDescriptor",
97
+ b"usesDepthwiseConvolution",
98
+ {"retval": {"type": b"Z"}},
99
+ )
100
+ r(
101
+ b"MLCDevice",
102
+ b"deviceWithType:selectsMultipleComputeDevices:",
103
+ {"arguments": {3: {"type": b"Z"}}},
104
+ )
105
+ r(
106
+ b"MLCEmbeddingDescriptor",
107
+ b"descriptorWithEmbeddingCount:embeddingDimension:paddingIndex:maximumNorm:pNorm:scalesGradientByFrequency:",
108
+ {"arguments": {7: {"type": b"Z"}}},
109
+ )
110
+ r(
111
+ b"MLCEmbeddingDescriptor",
112
+ b"scalesGradientByFrequency",
113
+ {"retval": {"type": b"Z"}},
114
+ )
115
+ r(
116
+ b"MLCGraph",
117
+ b"bindAndWriteData:forInputs:toDevice:batchSize:synchronous:",
118
+ {"retval": {"type": b"Z"}, "arguments": {6: {"type": b"Z"}}},
119
+ )
120
+ r(
121
+ b"MLCGraph",
122
+ b"bindAndWriteData:forInputs:toDevice:synchronous:",
123
+ {"retval": {"type": "Z"}, "arguments": {5: {"type": "Z"}}},
124
+ )
125
+ r(
126
+ b"MLCGraph",
127
+ b"nodeWithLayer:sources:disableUpdate:",
128
+ {"arguments": {4: {"type": b"Z"}}},
129
+ )
130
+ r(b"MLCInferenceGraph", b"addInputs:", {"retval": {"type": b"Z"}})
131
+ r(
132
+ b"MLCInferenceGraph",
133
+ b"addInputs:lossLabels:lossLabelWeights:",
134
+ {"retval": {"type": b"Z"}},
135
+ )
136
+ r(b"MLCInferenceGraph", b"addOutputs:", {"retval": {"type": b"Z"}})
137
+ r(b"MLCInferenceGraph", b"compileWithOptions:device:", {"retval": {"type": b"Z"}})
138
+ r(
139
+ b"MLCInferenceGraph",
140
+ b"compileWithOptions:device:inputTensors:inputTensorsData:",
141
+ {"retval": {"type": "Z"}},
142
+ )
143
+ r(
144
+ b"MLCInferenceGraph",
145
+ b"executeWithInputsData:batchSize:options:completionHandler:",
146
+ {
147
+ "retval": {"type": b"Z"},
148
+ "arguments": {
149
+ 5: {
150
+ "callable": {
151
+ "retval": {"type": b"v"},
152
+ "arguments": {
153
+ 0: {"type": b"^v"},
154
+ 1: {"type": b"@"},
155
+ 2: {"type": b"@"},
156
+ 3: {"type": b"d"},
157
+ },
158
+ }
159
+ }
160
+ },
161
+ },
162
+ )
163
+ r(
164
+ b"MLCInferenceGraph",
165
+ b"executeWithInputsData:lossLabelsData:lossLabelWeightsData:batchSize:options:completionHandler:",
166
+ {
167
+ "retval": {"type": b"Z"},
168
+ "arguments": {
169
+ 7: {
170
+ "callable": {
171
+ "retval": {"type": b"v"},
172
+ "arguments": {
173
+ 0: {"type": b"^v"},
174
+ 1: {"type": b"@"},
175
+ 2: {"type": b"@"},
176
+ 3: {"type": b"d"},
177
+ },
178
+ }
179
+ }
180
+ },
181
+ },
182
+ )
183
+ r(
184
+ b"MLCInferenceGraph",
185
+ b"executeWithInputsData:lossLabelsData:lossLabelWeightsData:outputsData:batchSize:options:completionHandler:",
186
+ {
187
+ "retval": {"type": b"Z"},
188
+ "arguments": {
189
+ 8: {
190
+ "callable": {
191
+ "retval": {"type": b"v"},
192
+ "arguments": {
193
+ 0: {"type": b"^v"},
194
+ 1: {"type": b"@"},
195
+ 2: {"type": b"@"},
196
+ 3: {"type": b"d"},
197
+ },
198
+ }
199
+ }
200
+ },
201
+ },
202
+ )
203
+ r(
204
+ b"MLCInferenceGraph",
205
+ b"executeWithInputsData:outputsData:batchSize:options:completionHandler:",
206
+ {
207
+ "retval": {"type": b"Z"},
208
+ "arguments": {
209
+ 6: {
210
+ "callable": {
211
+ "retval": {"type": b"v"},
212
+ "arguments": {
213
+ 0: {"type": b"^v"},
214
+ 1: {"type": b"@"},
215
+ 2: {"type": b"@"},
216
+ 3: {"type": b"d"},
217
+ },
218
+ }
219
+ }
220
+ },
221
+ },
222
+ )
223
+ r(b"MLCInferenceGraph", b"linkWithGraphs:", {"retval": {"type": b"Z"}})
224
+ r(b"MLCLSTMDescriptor", b"batchFirst", {"retval": {"type": b"Z"}})
225
+ r(
226
+ b"MLCLSTMDescriptor",
227
+ b"descriptorWithInputSize:hiddenSize:layerCount:usesBiases:batchFirst:isBidirectional:dropout:",
228
+ {"arguments": {5: {"type": b"Z"}, 6: {"type": b"Z"}, 7: {"type": b"Z"}}},
229
+ )
230
+ r(
231
+ b"MLCLSTMDescriptor",
232
+ b"descriptorWithInputSize:hiddenSize:layerCount:usesBiases:batchFirst:isBidirectional:returnsSequences:dropout:",
233
+ {
234
+ "arguments": {
235
+ 5: {"type": b"Z"},
236
+ 6: {"type": b"Z"},
237
+ 7: {"type": b"Z"},
238
+ 8: {"type": b"Z"},
239
+ }
240
+ },
241
+ )
242
+ r(
243
+ b"MLCLSTMDescriptor",
244
+ b"descriptorWithInputSize:hiddenSize:layerCount:usesBiases:batchFirst:isBidirectional:returnsSequences:dropout:resultMode:",
245
+ {
246
+ "arguments": {
247
+ 5: {"type": "Z"},
248
+ 6: {"type": "Z"},
249
+ 7: {"type": "Z"},
250
+ 8: {"type": "Z"},
251
+ }
252
+ },
253
+ )
254
+ r(
255
+ b"MLCLSTMDescriptor",
256
+ b"descriptorWithInputSize:hiddenSize:layerCount:usesBiases:isBidirectional:dropout:",
257
+ {"arguments": {5: {"type": b"Z"}, 6: {"type": b"Z"}}},
258
+ )
259
+ r(b"MLCLSTMDescriptor", b"isBidirectional", {"retval": {"type": b"Z"}})
260
+ r(b"MLCLSTMDescriptor", b"returnsSequences", {"retval": {"type": b"Z"}})
261
+ r(b"MLCLSTMDescriptor", b"usesBiases", {"retval": {"type": b"Z"}})
262
+ r(b"MLCLayer", b"isDebuggingEnabled", {"retval": {"type": b"Z"}})
263
+ r(b"MLCLayer", b"setIsDebuggingEnabled:", {"arguments": {2: {"type": b"Z"}}})
264
+ r(b"MLCLayer", b"supportsDataType:onDevice:", {"retval": {"type": "Z"}})
265
+ r(
266
+ b"MLCMatMulDescriptor",
267
+ b"descriptorWithAlpha:transposesX:transposesY:",
268
+ {"arguments": {3: {"type": b"Z"}, 4: {"type": b"Z"}}},
269
+ )
270
+ r(b"MLCMatMulDescriptor", b"transposesX", {"retval": {"type": b"Z"}})
271
+ r(b"MLCMatMulDescriptor", b"transposesY", {"retval": {"type": b"Z"}})
272
+ r(
273
+ b"MLCMultiheadAttentionDescriptor",
274
+ b"addsZeroAttention",
275
+ {"retval": {"type": b"Z"}},
276
+ )
277
+ r(
278
+ b"MLCMultiheadAttentionDescriptor",
279
+ b"descriptorWithModelDimension:keyDimension:valueDimension:headCount:dropout:hasBiases:hasAttentionBiases:addsZeroAttention:",
280
+ {"arguments": {7: {"type": b"Z"}, 8: {"type": b"Z"}, 9: {"type": b"Z"}}},
281
+ )
282
+ r(
283
+ b"MLCMultiheadAttentionDescriptor",
284
+ b"hasAttentionBiases",
285
+ {"retval": {"type": b"Z"}},
286
+ )
287
+ r(b"MLCMultiheadAttentionDescriptor", b"hasBiases", {"retval": {"type": b"Z"}})
288
+ r(b"MLCOptimizer", b"appliesGradientClipping", {"retval": {"type": b"Z"}})
289
+ r(
290
+ b"MLCOptimizer",
291
+ b"setAppliesGradientClipping:",
292
+ {"arguments": {2: {"type": b"Z"}}},
293
+ )
294
+ r(b"MLCOptimizerDescriptor", b"appliesGradientClipping", {"retval": {"type": b"Z"}})
295
+ r(
296
+ b"MLCOptimizerDescriptor",
297
+ b"descriptorWithLearningRate:gradientRescale:appliesGradientClipping:gradientClipMax:gradientClipMin:regularizationType:regularizationScale:",
298
+ {"arguments": {4: {"type": b"Z"}}},
299
+ )
300
+ r(
301
+ b"MLCOptimizerDescriptor",
302
+ b"descriptorWithLearningRate:gradientRescale:appliesGradientClipping:gradientClippingType:gradientClipMax:gradientClipMin:maximumClippingNorm:customGlobalNorm:regularizationType:regularizationScale:",
303
+ {"arguments": {4: {"type": b"Z"}}},
304
+ )
305
+ r(
306
+ b"MLCPoolingDescriptor",
307
+ b"averagePoolingDescriptorWithKernelSizes:strides:dilationRates:paddingPolicy:paddingSizes:countIncludesPadding:",
308
+ {"arguments": {7: {"type": b"Z"}}},
309
+ )
310
+ r(
311
+ b"MLCPoolingDescriptor",
312
+ b"averagePoolingDescriptorWithKernelSizes:strides:paddingPolicy:paddingSizes:countIncludesPadding:",
313
+ {"arguments": {6: {"type": b"Z"}}},
314
+ )
315
+ r(b"MLCPoolingDescriptor", b"countIncludesPadding", {"retval": {"type": b"Z"}})
316
+ r(b"MLCRMSPropOptimizer", b"isCentered", {"retval": {"type": b"Z"}})
317
+ r(
318
+ b"MLCRMSPropOptimizer",
319
+ b"optimizerWithDescriptor:momentumScale:alpha:epsilon:isCentered:",
320
+ {"arguments": {6: {"type": b"Z"}}},
321
+ )
322
+ r(
323
+ b"MLCSGDOptimizer",
324
+ b"optimizerWithDescriptor:momentumScale:usesNesterovMomentum:",
325
+ {"arguments": {4: {"type": "Z"}}},
326
+ )
327
+ r(
328
+ b"MLCSGDOptimizer",
329
+ b"optimizerWithDescriptor:momentumScale:usesNestrovMomentum:",
330
+ {"arguments": {4: {"type": b"Z"}}},
331
+ )
332
+ r(b"MLCSGDOptimizer", b"usesNesterovMomentum", {"retval": {"type": "Z"}})
333
+ r(b"MLCSGDOptimizer", b"usesNestrovMomentum", {"retval": {"type": b"Z"}})
334
+ r(b"MLCTensor", b"bindAndWriteData:toDevice:", {"retval": {"type": b"Z"}})
335
+ r(b"MLCTensor", b"bindOptimizerData:deviceData:", {"retval": {"type": "Z"}})
336
+ r(
337
+ b"MLCTensor",
338
+ b"copyDataFromDeviceMemoryToBytes:length:synchronizeWithDevice:",
339
+ {"retval": {"type": b"Z"}, "arguments": {4: {"type": b"Z"}}},
340
+ )
341
+ r(b"MLCTensor", b"hasValidNumerics", {"retval": {"type": b"Z"}})
342
+ r(b"MLCTensor", b"optimizerData:", {"retval": {"type": b"Z"}})
343
+ r(b"MLCTensor", b"synchronizeData", {"retval": {"type": b"Z"}})
344
+ r(b"MLCTensor", b"synchronizeOptimizerData", {"retval": {"type": "Z"}})
345
+ r(
346
+ b"MLCTensor",
347
+ b"tensorWithSequenceLengths:sortedSequences:featureChannelCount:batchSize:data:",
348
+ {"arguments": {3: {"type": b"Z"}}},
349
+ )
350
+ r(
351
+ b"MLCTensor",
352
+ b"tensorWithSequenceLengths:sortedSequences:featureChannelCount:batchSize:randomInitializerType:",
353
+ {"arguments": {3: {"type": b"Z"}}},
354
+ )
355
+ r(b"MLCTensorData", b"bytes", {"retval": {"c_array_of_variable_size": True}})
356
+ r(
357
+ b"MLCTensorData",
358
+ b"dataWithBytesNoCopy:length:",
359
+ {"arguments": {2: {"type_modifier": b"n", "c_array_length_in_arg": 3}}},
360
+ )
361
+ r(
362
+ b"MLCTensorData",
363
+ b"dataWithBytesNoCopy:length:deallocator:",
364
+ {
365
+ "arguments": {
366
+ 2: {"type_modifier": b"n", "c_array_length_in_arg": 3},
367
+ 4: {
368
+ "callable": {
369
+ "retval": {"type": b"v"},
370
+ "arguments": {
371
+ 0: {"type": b"^v"},
372
+ 1: {"type": b"n^v", "c_array_length_in_arg": 2},
373
+ 2: {"type": b"Q"},
374
+ },
375
+ }
376
+ },
377
+ }
378
+ },
379
+ )
380
+ r(
381
+ b"MLCTensorData",
382
+ b"dataWithImmutableBytesNoCopy:length:",
383
+ {"arguments": {2: {"type_modifier": b"n", "c_array_length_in_arg": 3}}},
384
+ )
385
+ r(
386
+ b"MLCTensorDescriptor",
387
+ b"descriptorWithShape:sequenceLengths:sortedSequences:dataType:",
388
+ {"arguments": {4: {"type": b"Z"}}},
389
+ )
390
+ r(b"MLCTensorDescriptor", b"sortedSequences", {"retval": {"type": b"Z"}})
391
+ r(b"MLCTensorParameter", b"isUpdatable", {"retval": {"type": b"Z"}})
392
+ r(b"MLCTensorParameter", b"setIsUpdatable:", {"arguments": {2: {"type": b"Z"}}})
393
+ r(b"MLCTrainingGraph", b"addInputs:lossLabels:", {"retval": {"type": b"Z"}})
394
+ r(
395
+ b"MLCTrainingGraph",
396
+ b"addInputs:lossLabels:lossLabelWeights:",
397
+ {"retval": {"type": b"Z"}},
398
+ )
399
+ r(b"MLCTrainingGraph", b"addOutputs:", {"retval": {"type": b"Z"}})
400
+ r(
401
+ b"MLCTrainingGraph",
402
+ b"bindOptimizerData:deviceData:withTensor:",
403
+ {"retval": {"type": "Z"}},
404
+ )
405
+ r(b"MLCTrainingGraph", b"compileOptimizer:", {"retval": {"type": b"Z"}})
406
+ r(b"MLCTrainingGraph", b"compileWithOptions:device:", {"retval": {"type": b"Z"}})
407
+ r(
408
+ b"MLCTrainingGraph",
409
+ b"compileWithOptions:device:inputTensors:inputTensorsData:",
410
+ {"retval": {"type": "Z"}},
411
+ )
412
+ r(
413
+ b"MLCTrainingGraph",
414
+ b"executeForwardWithBatchSize:options:completionHandler:",
415
+ {
416
+ "retval": {"type": b"Z"},
417
+ "arguments": {
418
+ 4: {
419
+ "callable": {
420
+ "retval": {"type": b"v"},
421
+ "arguments": {
422
+ 0: {"type": b"^v"},
423
+ 1: {"type": b"@"},
424
+ 2: {"type": b"@"},
425
+ 3: {"type": b"d"},
426
+ },
427
+ }
428
+ }
429
+ },
430
+ },
431
+ )
432
+ r(
433
+ b"MLCTrainingGraph",
434
+ b"executeForwardWithBatchSize:options:outputsData:completionHandler:",
435
+ {
436
+ "retval": {"type": b"Z"},
437
+ "arguments": {
438
+ 5: {
439
+ "callable": {
440
+ "retval": {"type": b"v"},
441
+ "arguments": {
442
+ 0: {"type": b"^v"},
443
+ 1: {"type": b"@"},
444
+ 2: {"type": b"@"},
445
+ 3: {"type": b"d"},
446
+ },
447
+ }
448
+ }
449
+ },
450
+ },
451
+ )
452
+ r(
453
+ b"MLCTrainingGraph",
454
+ b"executeGradientWithBatchSize:options:completionHandler:",
455
+ {
456
+ "retval": {"type": b"Z"},
457
+ "arguments": {
458
+ 4: {
459
+ "callable": {
460
+ "retval": {"type": b"v"},
461
+ "arguments": {
462
+ 0: {"type": b"^v"},
463
+ 1: {"type": b"@"},
464
+ 2: {"type": b"@"},
465
+ 3: {"type": b"d"},
466
+ },
467
+ }
468
+ }
469
+ },
470
+ },
471
+ )
472
+ r(
473
+ b"MLCTrainingGraph",
474
+ b"executeGradientWithBatchSize:options:outputsData:completionHandler:",
475
+ {
476
+ "retval": {"type": b"Z"},
477
+ "arguments": {
478
+ 5: {
479
+ "callable": {
480
+ "retval": {"type": b"v"},
481
+ "arguments": {
482
+ 0: {"type": b"^v"},
483
+ 1: {"type": b"@"},
484
+ 2: {"type": b"@"},
485
+ 3: {"type": b"d"},
486
+ },
487
+ }
488
+ }
489
+ },
490
+ },
491
+ )
492
+ r(
493
+ b"MLCTrainingGraph",
494
+ b"executeOptimizerUpdateWithOptions:completionHandler:",
495
+ {
496
+ "retval": {"type": b"Z"},
497
+ "arguments": {
498
+ 3: {
499
+ "callable": {
500
+ "retval": {"type": b"v"},
501
+ "arguments": {
502
+ 0: {"type": b"^v"},
503
+ 1: {"type": b"@"},
504
+ 2: {"type": b"@"},
505
+ 3: {"type": b"d"},
506
+ },
507
+ }
508
+ }
509
+ },
510
+ },
511
+ )
512
+ r(
513
+ b"MLCTrainingGraph",
514
+ b"executeWithInputsData:lossLabelsData:lossLabelWeightsData:batchSize:options:completionHandler:",
515
+ {
516
+ "retval": {"type": b"Z"},
517
+ "arguments": {
518
+ 7: {
519
+ "callable": {
520
+ "retval": {"type": b"v"},
521
+ "arguments": {
522
+ 0: {"type": b"^v"},
523
+ 1: {"type": b"@"},
524
+ 2: {"type": b"@"},
525
+ 3: {"type": b"d"},
526
+ },
527
+ }
528
+ }
529
+ },
530
+ },
531
+ )
532
+ r(
533
+ b"MLCTrainingGraph",
534
+ b"executeWithInputsData:lossLabelsData:lossLabelWeightsData:outputsData:batchSize:options:completionHandler:",
535
+ {
536
+ "retval": {"type": b"Z"},
537
+ "arguments": {
538
+ 8: {
539
+ "callable": {
540
+ "retval": {"type": b"v"},
541
+ "arguments": {
542
+ 0: {"type": b"^v"},
543
+ 1: {"type": b"@"},
544
+ 2: {"type": b"@"},
545
+ 3: {"type": b"d"},
546
+ },
547
+ }
548
+ }
549
+ },
550
+ },
551
+ )
552
+ r(b"MLCTrainingGraph", b"linkWithGraphs:", {"retval": {"type": b"Z"}})
553
+ r(b"MLCTrainingGraph", b"setTrainingTensorParameters:", {"retval": {"type": b"Z"}})
554
+ r(b"MLCTrainingGraph", b"stopGradientForTensors:", {"retval": {"type": b"Z"}})
555
+ r(b"MLCUpsampleLayer", b"alignsCorners", {"retval": {"type": b"Z"}})
556
+ r(
557
+ b"MLCUpsampleLayer",
558
+ b"layerWithShape:sampleMode:alignsCorners:",
559
+ {"arguments": {4: {"type": b"Z"}}},
560
+ )
561
+ r(
562
+ b"MLCYOLOLossDescriptor",
563
+ b"setShouldRescore:",
564
+ {"arguments": {2: {"type": b"Z"}}},
565
+ )
566
+ r(b"MLCYOLOLossDescriptor", b"shouldRescore", {"retval": {"type": b"Z"}})
567
+ finally:
568
+ objc._updatingMetadata(False)
569
+
570
+ objc.registerNewKeywordsFromSelector("MLCOptimizer", b"initWithDescriptor:")
571
+ expressions = {}
572
+
573
+ # END OF FILE
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyobjc-framework-MLCompute
3
+ Version: 10.3.2
4
+ Summary: Wrappers for the framework MLCompute on macOS
5
+ Home-page: https://github.com/ronaldoussoren/pyobjc
6
+ Author: Ronald Oussoren
7
+ Author-email: pyobjc-dev@lists.sourceforge.net
8
+ License: MIT License
9
+ Keywords: PyObjC,MLCompute
10
+ Platform: MacOS X (>=10.16)
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Environment :: MacOS X :: Cocoa
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Natural Language :: English
17
+ Classifier: Operating System :: MacOS :: MacOS X
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: Implementation :: CPython
28
+ Classifier: Programming Language :: Objective C
29
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
+ Classifier: Topic :: Software Development :: User Interfaces
31
+ Requires-Python: >=3.8
32
+ Description-Content-Type: text/x-rst; charset=UTF-8
33
+ Requires-Dist: pyobjc-core>=10.3.2
34
+ Requires-Dist: pyobjc-framework-Cocoa>=10.3.2
35
+ Project-URL: Documentation, https://pyobjc.readthedocs.io/en/latest/
36
+ Project-URL: Issue tracker, https://github.com/ronaldoussoren/pyobjc/issues
37
+ Project-URL: Repository, https://github.com/ronaldoussoren/pyobjc
38
+
39
+
40
+ Wrappers for the "MLCompute" framework on macOS.
41
+
42
+ These wrappers don't include documentation, please check Apple's documentation
43
+ for information on how to use this framework and PyObjC's documentation
44
+ for general tips and tricks regarding the translation between Python
45
+ and (Objective-)C frameworks
46
+
47
+
48
+ Project links
49
+ -------------
50
+
51
+ * `Documentation <https://pyobjc.readthedocs.io/en/latest/>`_
52
+
53
+ * `Issue Tracker <https://github.com/ronaldoussoren/pyobjc/issues>`_
54
+
55
+ * `Repository <https://github.com/ronaldoussoren/pyobjc/>`_
56
+
@@ -0,0 +1,6 @@
1
+ MLCompute/__init__.py,sha256=zA7gyo_MXQG93hga5eGL_tg1DjAFTzysaYn5O36Z3p8,2227
2
+ MLCompute/_metadata.py,sha256=2MGGX9HcwqBN4Vewp54_kWZy2IuV4HrIoiD6TRe_8U8,24141
3
+ pyobjc_framework_MLCompute-10.3.2.dist-info/METADATA,sha256=hqlWAfESGO-oovgIEVPjTS6-IcQVbWkVQcTqlQtgsE4,2242
4
+ pyobjc_framework_MLCompute-10.3.2.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
5
+ pyobjc_framework_MLCompute-10.3.2.dist-info/top_level.txt,sha256=ccl4EeIVEOHHRfXQHQa2467gSPDqN7tyLoAGoBbmWW4,10
6
+ pyobjc_framework_MLCompute-10.3.2.dist-info/RECORD,,
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.6.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any
6
+
@@ -0,0 +1 @@
1
+ MLCompute