Documentation ¶
Overview ¶
* Copyright (c) 2022, HabanaLabs Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Variables
- func AcceleratorDevices() []string
- func AcceleratorModuleID(acceleratorID string) (string, error)
- func CharDevices(prefixes []string) ([]string, error)
- func DevicesIDs(devices []string) []string
- func ExternalInterfaces(absHlibDevicePaths []string) ([]string, error)
- func InfinibandDevices() []string
- func UverbsForAccelerators(deviceIDs []string) ([]string, error)
- type DevInfo
Constants ¶
This section is empty.
Variables ¶
var ErrNoDevices = errors.New("no habanalabs devices found. driver might not be loaded")
var SysClassAccel = "/sys/class/accel/accel"
Functions ¶
func AcceleratorDevices ¶
func AcceleratorDevices() []string
AcceleratorDevices finds the Habanalabs infiniband cards for the accelerators, and their control units, i.e accel0 and accel_controlD0
func AcceleratorModuleID ¶
AcceleratorModuleID returns the module ID (OAM) of the requested accelerator.
func CharDevices ¶
func DevicesIDs ¶
DevicesIDs returns the unique device ids on the system
func ExternalInterfaces ¶
Extract network interfaces names from hlib device.
func InfinibandDevices ¶
func InfinibandDevices() []string
InfinibandDevices finds the related Habanalabs infiniband cards for the accelerators.
func UverbsForAccelerators ¶
UverbsForAccelerators returns list of infiniband char devices attached to each accelerator provided.