# InferenceComponentComputeResourceRequirementsProperty

Defines the compute resources to allocate to run a model, plus any adapter models, that you assign to an inference component.

These resources include CPU cores, accelerators, and memory.

- Source: Generated at build time
- Type last changed: v2.113.0 · 1 Dec 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const inferenceComponentComputeResourceRequirementsProperty: sagemaker.CfnInferenceComponent.InferenceComponentComputeResourceRequirementsProperty = {
  maxMemoryRequiredInMb: 123,
  minMemoryRequiredInMb: 123,
  numberOfAcceleratorDevicesRequired: 123,
  numberOfCpuCoresRequired: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

inference_component_compute_resource_requirements_property = sagemaker.CfnInferenceComponent.InferenceComponentComputeResourceRequirementsProperty(
    max_memory_required_in_mb=123,
    min_memory_required_in_mb=123,
    number_of_accelerator_devices_required=123,
    number_of_cpu_cores_required=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

InferenceComponentComputeResourceRequirementsProperty inferenceComponentComputeResourceRequirementsProperty = InferenceComponentComputeResourceRequirementsProperty.builder()
        .maxMemoryRequiredInMb(123)
        .minMemoryRequiredInMb(123)
        .numberOfAcceleratorDevicesRequired(123)
        .numberOfCpuCoresRequired(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var inferenceComponentComputeResourceRequirementsProperty = new InferenceComponentComputeResourceRequirementsProperty {
    MaxMemoryRequiredInMb = 123,
    MinMemoryRequiredInMb = 123,
    NumberOfAcceleratorDevicesRequired = 123,
    NumberOfCpuCoresRequired = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

inferenceComponentComputeResourceRequirementsProperty := &InferenceComponentComputeResourceRequirementsProperty{
	MaxMemoryRequiredInMb: jsii.Number(123),
	MinMemoryRequiredInMb: jsii.Number(123),
	NumberOfAcceleratorDevicesRequired: jsii.Number(123),
	NumberOfCpuCoresRequired: jsii.Number(123),
}
```

## Properties

- `maxMemoryRequiredInMb`: number — The maximum MB of memory to allocate to run a model that you assign to an inference component.

- `minMemoryRequiredInMb`: number — The minimum MB of memory to allocate to run a model that you assign to an inference component.

- `numberOfAcceleratorDevicesRequired`: number — The number of accelerators to allocate to run a model that you assign to an inference component.

  Accelerators include GPUs and AWS Inferentia.

- `numberOfCpuCoresRequired`: number — The number of CPU cores to allocate to run a model that you assign to an inference component.
