Skip to content

Remove slot-based device partitioning methods to establish SHARED-only baseline #8425

@hhoikoo

Description

@hhoikoo

Motivation

The current multi-agent resource allocation uses slot-based configuration with complex _calculate_device_slot_* methods that tightly couple slot calculation with allocation modes. Before implementing the new device-based approach from BEP-1041, we need to establish a clean baseline by removing this complexity. This allows us to incrementally rebuild the partitioning logic with the new device-centric design.

Required Features

  • Remove _calculate_device_slot() dispatch method from ResourceAllocator
  • Remove _calculate_device_slot_shared() method
  • Remove _calculate_device_slot_auto_split() method
  • Remove _calculate_device_slot_manual() method
  • Make AUTO_SPLIT and MANUAL modes fall back to SHARED behavior (all agents see all devices)
  • Remove or skip tests that verify partitioning behavior (they will fail until restored in later tickets)

Impact

  • src/ai/backend/agent/resources.py - ResourceAllocator class
  • tests/unit/agent/test_resource_allocation.py - Tests for removed functionality

Testing Scenarios

  1. SHARED mode unchanged: Verify SHARED mode continues to work as before (all agents see all devices)
  2. AUTO_SPLIT fallback: Verify AUTO_SPLIT mode now behaves like SHARED (no partitioning)
  3. MANUAL fallback: Verify MANUAL mode now behaves like SHARED (no partitioning)
  4. No runtime errors: Verify agent starts successfully with each allocation mode

JIRA Issue: BA-4143

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions