diff --git a/.cspell.json b/.cspell.json index 7571db678a..5c44820ac6 100644 --- a/.cspell.json +++ b/.cspell.json @@ -7,7 +7,9 @@ "backendaioptions", "cssinjs", "cuda", + "FGPU", "Frgmt", + "Gaudi", "keypair", "Lablup", "OPENBLAS", @@ -15,6 +17,7 @@ "preopen", "shmem", "vfolders", + "Warboy", "webcomponent", "webui", "wsproxy", diff --git a/config.toml.sample b/config.toml.sample index 2c616a123b..1e00c200f8 100644 --- a/config.toml.sample +++ b/config.toml.sample @@ -56,6 +56,7 @@ maxTPUDevicesPerContainer = 8 # Maximum TPU devices per container. maxIPUDevicesPerContainer = 8 # Maximum IPU devices per container. maxATOMDevicesPerContainer = 8 # Maximum ATOM devices per container. maxATOMPLUSDevicesPerContainer = 8 # Maximum ATOM_PLUS devices per container. +maxGaudi2DevicesPerContainer = 8 # Maximum Gaudi 2 devices per container. maxWarboyDevicesPerContainer = 8 # Maximum Warboy devices per container. maxHyperaccelLPUDevicesPerContainer = 8 # Maximum Hyperaccel LPU devices per container. maxShmPerContainer = 16 # Maximum shared memory per container. diff --git a/react/src/components/AgentList.tsx b/react/src/components/AgentList.tsx index d26c0a0a72..a35ccab98e 100644 --- a/react/src/components/AgentList.tsx +++ b/react/src/components/AgentList.tsx @@ -372,10 +372,7 @@ const AgentList: React.FC = ({ /> ); - } else if ( - parsedOccupiedSlots[key] && - parsedAvailableSlots[key] - ) { + } else if (parsedAvailableSlots[key]) { return ( = ({ 'ipu.device': [view_module, 'IPU'], 'atom.device': ['/resources/icons/rebel.svg', 'ATOM'], 'atom-plus.device': ['/resources/icons/rebel.svg', 'ATOM+'], + 'gaudi2.device': ['/resources/icons/gaudi.svg', 'Gaudi 2'], 'warboy.device': ['/resources/icons/furiosa.svg', 'Warboy'], 'hyperaccel-lpu.device': [ '/resources/icons/npu_generic.svg', diff --git a/react/src/components/ServiceLauncherPageContent.tsx b/react/src/components/ServiceLauncherPageContent.tsx index d6b1980132..14a157cb2b 100644 --- a/react/src/components/ServiceLauncherPageContent.tsx +++ b/react/src/components/ServiceLauncherPageContent.tsx @@ -66,6 +66,8 @@ interface ServiceCreateConfigResourceType { 'tpu.device'?: number | string; 'ipu.device'?: number | string; 'atom.device'?: number | string; + 'gaudi2.device'?: number | string; + 'atom-plus.device'?: number | string; 'warboy.device'?: number | string; 'hyperaccel-lpu.device'?: number | string; } diff --git a/react/src/components/VFolderSelect.tsx b/react/src/components/VFolderSelect.tsx index ebc714f97f..54464f282c 100644 --- a/react/src/components/VFolderSelect.tsx +++ b/react/src/components/VFolderSelect.tsx @@ -1,7 +1,7 @@ import { useBaiSignedRequestWithPromise } from '../helper'; import { useUpdatableState } from '../hooks'; -import useControllableState from '../hooks/useControllableState'; import { useSuspenseTanQuery } from '../hooks/reactQueryAlias'; +import useControllableState from '../hooks/useControllableState'; import { useCurrentProjectValue } from '../hooks/useCurrentProject'; import { Select, SelectProps } from 'antd'; import _ from 'lodash'; diff --git a/react/src/components/VFolderTable.tsx b/react/src/components/VFolderTable.tsx index 9f0fff0987..e5e4d21bbb 100644 --- a/react/src/components/VFolderTable.tsx +++ b/react/src/components/VFolderTable.tsx @@ -1,8 +1,8 @@ import { useBaiSignedRequestWithPromise } from '../helper'; import { useSuspendedBackendaiClient, useUpdatableState } from '../hooks'; import { useKeyPairLazyLoadQuery } from '../hooks/hooksUsingRelay'; -import useControllableState from '../hooks/useControllableState'; import { useSuspenseTanQuery } from '../hooks/reactQueryAlias'; +import useControllableState from '../hooks/useControllableState'; import { useCurrentProjectValue } from '../hooks/useCurrentProject'; import { useEventNotStable } from '../hooks/useEventNotStable'; import { useShadowRoot } from './DefaultProviders'; diff --git a/react/src/helper/index.tsx b/react/src/helper/index.tsx index 19f33b69ec..6410df1ab4 100644 --- a/react/src/helper/index.tsx +++ b/react/src/helper/index.tsx @@ -191,7 +191,6 @@ export function iSizeToSize( }; } -// export function toFixedFloorWithoutTrailingZeros( num: number | string, fixed: number, diff --git a/react/src/hooks/backendai.tsx b/react/src/hooks/backendai.tsx index 331860e2f0..50d9dc42d6 100644 --- a/react/src/hooks/backendai.tsx +++ b/react/src/hooks/backendai.tsx @@ -32,6 +32,7 @@ export const useResourceSlots = () => { 'ipu.device'?: string; 'atom.device'?: string; 'atom-plus.device'?: string; + 'gaudi2.device'?: string; 'warboy.device'?: string; 'hyperaccel-lpu.device'?: string; [key: string]: string | undefined; diff --git a/react/src/hooks/index.tsx b/react/src/hooks/index.tsx index 093a89a4ba..8791244a73 100644 --- a/react/src/hooks/index.tsx +++ b/react/src/hooks/index.tsx @@ -357,6 +357,8 @@ type BackendAIConfig = { maxTPUDevicesPerContainer: number; maxIPUDevicesPerContainer: number; maxATOMDevicesPerContainer: number; + maxATOMPlusDevicesPerContainer: number; + maxGaudi2DevicesPerContainer: number; maxWarboyDevicesPerContainer: number; maxShmPerContainer: number; maxFileUploadSize: number; diff --git a/react/src/hooks/useResourceLimitAndRemaining.tsx b/react/src/hooks/useResourceLimitAndRemaining.tsx index b271de5105..8416102579 100644 --- a/react/src/hooks/useResourceLimitAndRemaining.tsx +++ b/react/src/hooks/useResourceLimitAndRemaining.tsx @@ -274,6 +274,7 @@ export const useResourceLimitAndRemaining = ({ 'ipu.device': 'maxIPUDevicesPerContainer', 'atom.device': 'maxATOMDevicesPerContainer', 'atom-plus.device': 'maxATOMPlusDevicesPerContainer', + 'gaudi2.device': 'maxGaudi2DevicesPerContainer', 'warboy.device': 'maxWarboyDevicesPerContainer', 'hyperaccel-lpu.device': 'maxHyperaccelLPUDevicesPerContainer', // FIXME: add maxLPUDevicesPerContainer to config }[key] || 'cuda.device'; // FIXME: temporally `cuda.device` config, when undefined diff --git a/resources/device_metadata.json b/resources/device_metadata.json index b0e757df82..6650dbf3bb 100644 --- a/resources/device_metadata.json +++ b/resources/device_metadata.json @@ -99,6 +99,17 @@ }, "display_icon": "rebel" }, + "gaudi2.device" : { + "slot_name": "gaudi2.device", + "description": "Gaudi 2", + "human_readable_name": "Gaudi 2 Device", + "display_unit": "Gaudi 2", + "number_format": { + "binary": false, + "round_length": 0 + }, + "display_icon": "gaudi" + }, "warboy.device": { "slot_name": "warboy.device", "description": "Furiosa Warboy", diff --git a/resources/i18n/de.json b/resources/i18n/de.json index 5c23775220..a32e3eae25 100644 --- a/resources/i18n/de.json +++ b/resources/i18n/de.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Umgebung und Version", "Tags": "Stichworte", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Ermöglicht", "ForceTerminateWarningMsg": "Diese Aktion beendet oder bricht die Sitzung ab, unabhängig von ihrem aktuellen Status. \nBist du sicher?", "WarningForceTerminateSessions": "Warnung: Beendigung der Sitzung(en) erzwingen", "ForceTerminateWarningMsg2": "Nur ausführen, wenn sich der Zustand über einen unangemessen langen Zeitraum nicht ändert.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Verwenden Sie den Hyperaccel LPU-Beschleuniger.", "RequireHyperaccelLPUPlugin": "Erfordert das Backend.AI Hyperaccel LPU-Plugin.", - "SearchPlaceholder": "Suche" + "SearchPlaceholder": "Suche", + "Gaudi2Support": "Gaudi 2-Unterstützung", + "RequireGaudi2Plugin": "Erfordert das Backend.AI Gaudi 2-Plugin.", + "DescGaudi2Support": "Verwenden Sie den Intel Gaudi 2-Beschleuniger", + "ATOMPlusSupport": "ATOM+ Unterstützung", + "RequireATOMPlusPlugin": "Erfordert das Backend.AI ATOM+ Plugin.", + "DescATOMPlusSupport": "Benutzen Sie den ATOM+ Beschleuniger von Rebellions." }, "notification": { "SuccessfullyUpdated": "Erfolgreich aktualisiert", diff --git a/resources/i18n/el.json b/resources/i18n/el.json index bac236da31..be61517601 100644 --- a/resources/i18n/el.json +++ b/resources/i18n/el.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Περιβάλλον και Έκδοση", "Tags": "Ετικέτες", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Ενεργοποιημένο", "ForceTerminateWarningMsg": "Αυτή η ενέργεια θα τερματίσει ή θα ακυρώσει τη συνεδρία ανεξάρτητα από την τρέχουσα κατάστασή της. \nΕίσαι σίγουρος?", "WarningForceTerminateSessions": "Προειδοποίηση: Αναγκαστικός τερματισμός συνεδρίας", "ForceTerminateWarningMsg2": "Εκτελέστε μόνο όταν η κατάσταση δεν αλλάζει για αδικαιολόγητα μεγάλο χρονικό διάστημα.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Χρησιμοποιήστε τον επιταχυντή Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Απαιτεί το πρόσθετο Backend.AI Hyperaccel LPU.", - "SearchPlaceholder": "Αναζήτηση" + "SearchPlaceholder": "Αναζήτηση", + "Gaudi2Support": "Υποστήριξη Gaudi 2", + "RequireGaudi2Plugin": "Απαιτεί το πρόσθετο Backend.AI Gaudi 2.", + "DescGaudi2Support": "Χρησιμοποιήστε τον επιταχυντή intel Gaudi 2", + "ATOMPlusSupport": "Υποστήριξη ATOM+", + "RequireATOMPlusPlugin": "Απαιτεί πρόσθετο Backend.AI ATOM+.", + "DescATOMPlusSupport": "Χρησιμοποιήστε τον επιταχυντή Rebellions ATOM+." }, "notification": { "SuccessfullyUpdated": "Ενημερώθηκε με επιτυχία", diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 95a1c8c934..76869d5506 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -424,6 +424,7 @@ "EnvironmentAndVersion": "Environment and Version", "Tags": "Tags", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Enabled", "ForceTerminateWarningMsg": "This action will terminate or cancel the session regardless of its current status. Are you sure?", "WarningForceTerminateSessions": "Warning: Force Terminate Session(s)", "ForceTerminateWarningMsg2": "Execute only when the state does not change for an unreasonably long period of time.", @@ -1367,7 +1368,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Use Hyperaccel LPU accelerator.", "RequireHyperaccelLPUPlugin": "Requires Backend.AI Hyperaccel LPU Plugin.", - "SearchPlaceholder": "Search" + "SearchPlaceholder": "Search", + "Gaudi2Support": "Gaudi 2 Support", + "RequireGaudi2Plugin": "Requires Backend.AI Gaudi 2 Plugin.", + "DescGaudi2Support": "Use intel Gaudi2 accelerator", + "ATOMPlusSupport": "ATOM+ Support", + "RequireATOMPlusPlugin": "Requires Backend.AI ATOM+ Plugin.", + "DescATOMPlusSupport": "Use Rebellions ATOM+ accelerator." }, "notification": { "SuccessfullyUpdated": "Successfully Updated", diff --git a/resources/i18n/es.json b/resources/i18n/es.json index c3e0413d1f..bfcdb17f83 100644 --- a/resources/i18n/es.json +++ b/resources/i18n/es.json @@ -1278,6 +1278,7 @@ "EnvironmentAndVersion": "Entorno y versión", "Tags": "Etiquetas", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Activado", "ForceTerminateWarningMsg": "Esta acción terminará o cancelará la sesión independientemente de su estado actual. \n¿Está seguro?", "WarningForceTerminateSessions": "Advertencia: Forzar la finalización de sesiones", "ForceTerminateWarningMsg2": "Ejecutar solo cuando el estado no cambie durante un período de tiempo excesivamente largo.", @@ -1351,7 +1352,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Utilice el acelerador Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Requiere el complemento LPU Backend.AI Hyperaccel.", - "SearchPlaceholder": "Buscar en" + "SearchPlaceholder": "Buscar en", + "Gaudi2Support": "Soporte Gaudí 2", + "RequireGaudi2Plugin": "Requiere el complemento Backend.AI Gaudi 2.", + "DescGaudi2Support": "Utilice el acelerador Intel Gaudí 2", + "ATOMPlusSupport": "Soporte ATOM+", + "RequireATOMPlusPlugin": "Requiere el complemento Backend.AI ATOM+.", + "DescATOMPlusSupport": "Usa el acelerador ATOM+ de Rebellions." }, "sidepanel": { "BackgroundTasks": "Tareas en curso", diff --git a/resources/i18n/fi.json b/resources/i18n/fi.json index 417015e2d2..2e868731e0 100644 --- a/resources/i18n/fi.json +++ b/resources/i18n/fi.json @@ -1275,6 +1275,7 @@ "EnvironmentAndVersion": "Ympäristö ja versio", "Tags": "Tunnisteet", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Käytössä", "ForceTerminateWarningMsg": "Tämä toiminto lopettaa tai peruuttaa istunnon riippumatta sen nykyisestä tilasta. \nOletko varma?", "WarningForceTerminateSessions": "Varoitus: pakota lopettamaan istunnot", "ForceTerminateWarningMsg2": "Suorita vain, kun tila ei muutu kohtuuttoman pitkään.", @@ -1348,7 +1349,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Käytä Hyperaccel LPU -kiihdytintä.", "RequireHyperaccelLPUPlugin": "Vaatii Backend.AI Hyperaccel LPU -laajennuksen.", - "SearchPlaceholder": "Etsi" + "SearchPlaceholder": "Etsi", + "Gaudi2Support": "Gaudi 2 -tuki", + "RequireGaudi2Plugin": "Vaatii Backend.AI Gaudi 2-laajennuksen.", + "DescGaudi2Support": "Käytä Intel Gaudi 2 -kiihdytintä", + "ATOMPlusSupport": "ATOM+-tuki", + "RequireATOMPlusPlugin": "Vaatii Backend.AI ATOM+ laajennuksen.", + "DescATOMPlusSupport": "Käytä Rebellions ATOM+ -kiihdytintä." }, "sidepanel": { "BackgroundTasks": "Tehtävien suorittaminen", diff --git a/resources/i18n/fr.json b/resources/i18n/fr.json index afd7774dfb..34fef8d4bf 100644 --- a/resources/i18n/fr.json +++ b/resources/i18n/fr.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Environnement et version", "Tags": "Mots clés", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Activé", "ForceTerminateWarningMsg": "Cette action mettra fin ou annulera la session quel que soit son statut actuel. \nEs-tu sûr?", "WarningForceTerminateSessions": "Avertissement : Forcer la fin des sessions", "ForceTerminateWarningMsg2": "Exécuter uniquement lorsque l’état ne change pas pendant une période de temps déraisonnablement longue.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Utilisez l'accélérateur Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Nécessite le plugin LPU Backend.AI Hyperaccel.", - "SearchPlaceholder": "Recherche" + "SearchPlaceholder": "Recherche", + "Gaudi2Support": "Assistance Gaudi 2", + "RequireGaudi2Plugin": "Nécessite le plugin Backend.AI Gaudi 2.", + "DescGaudi2Support": "Utiliser l'accélérateur Intel Gaudi 2", + "ATOMPlusSupport": "Prise en charge ATOM+", + "RequireATOMPlusPlugin": "Nécessite le plugin Backend.AI ATOM+.", + "DescATOMPlusSupport": "Utilisez l’accélérateur Rebellions ATOM+." }, "notification": { "SuccessfullyUpdated": "Mise à jour réussie", diff --git a/resources/i18n/id.json b/resources/i18n/id.json index 6d7faed728..6f07daaeb1 100644 --- a/resources/i18n/id.json +++ b/resources/i18n/id.json @@ -411,6 +411,7 @@ "Tags": "Tag", "Agents": "Agen", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Diaktifkan", "ForceTerminateWarningMsg": "Tindakan ini akan mengakhiri atau membatalkan sesi terlepas dari statusnya saat ini. \nApa kamu yakin?", "WarningForceTerminateSessions": "Peringatan: Paksa Mengakhiri Sesi", "ForceTerminateWarningMsg2": "Jalankan hanya ketika keadaan tidak berubah dalam jangka waktu yang terlalu lama.", @@ -1243,7 +1244,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Gunakan akselerator Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Memerlukan Plugin LPU Backend.AI Hyperaccel.", - "SearchPlaceholder": "Pencarian" + "SearchPlaceholder": "Pencarian", + "Gaudi2Support": "Dukungan Gaudi 2", + "RequireGaudi2Plugin": "Membutuhkan Plugin Backend.AI Gaudi 2.", + "DescGaudi2Support": "Gunakan akselerator intel Gaudi 2", + "ATOMPlusSupport": "Dukungan ATOM+", + "RequireATOMPlusPlugin": "Membutuhkan Plugin Backend.AI ATOM+.", + "DescATOMPlusSupport": "Gunakan akselerator ATOM+ Rebellions." }, "notification": { "SuccessfullyUpdated": "Berhasil Diperbarui", diff --git a/resources/i18n/it.json b/resources/i18n/it.json index e09d73953d..685426c458 100644 --- a/resources/i18n/it.json +++ b/resources/i18n/it.json @@ -411,6 +411,7 @@ "EnvironmentAndVersion": "Ambiente e versione", "Tags": "Tag", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Abilitato", "ForceTerminateWarningMsg": "Questa azione terminerà o annullerà la sessione indipendentemente dal suo stato attuale. \nSei sicuro?", "WarningForceTerminateSessions": "Avviso: forza la chiusura delle sessioni", "ForceTerminateWarningMsg2": "Eseguire solo quando lo stato non cambia per un periodo di tempo irragionevolmente lungo.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Utilizzare l'acceleratore Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Richiede il plugin Backend.AI Hyperaccel LPU.", - "SearchPlaceholder": "Ricerca" + "SearchPlaceholder": "Ricerca", + "Gaudi2Support": "Supporto Gaudì 2", + "RequireGaudi2Plugin": "Richiede il plugin Backend.AI Gaudi 2.", + "DescGaudi2Support": "Utilizza l'acceleratore Intel Gaudi 2", + "ATOMPlusSupport": "Supporto ATOM+", + "RequireATOMPlusPlugin": "Richiede il plugin Backend.AI ATOM+.", + "DescATOMPlusSupport": "Usa l'acceleratore ATOM+ di Rebellions." }, "notification": { "SuccessfullyUpdated": "Aggiornato con successo", diff --git a/resources/i18n/ja.json b/resources/i18n/ja.json index 328ce0709e..afe1bcc27a 100644 --- a/resources/i18n/ja.json +++ b/resources/i18n/ja.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "環境とバージョン", "Tags": "タグ", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU 有効", "ForceTerminateWarningMsg": "このアクションにより、現在のステータスに関係なくセッションが終了またはキャンセルされます。\n本気ですか?", "WarningForceTerminateSessions": "警告: セッションを強制終了します", "ForceTerminateWarningMsg2": "状態が不当に長時間変化しない場合にのみ実行してください。", @@ -1241,7 +1242,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Hyperaccel LPU アクセラレータを使用します。", "RequireHyperaccelLPUPlugin": "Backend.AI Hyperaccel LPU プラグインが必要です。", - "SearchPlaceholder": "検索" + "SearchPlaceholder": "検索", + "Gaudi2Support": "Gaudi 2 のサポート", + "RequireGaudi2Plugin": "Backend.AI Gaudi 2 プラグインが必要です。", + "DescGaudi2Support": "Intel Gaudi 2 アクセラレータを使用する", + "ATOMPlusSupport": "アトムのサポート", + "RequireATOMPlusPlugin": "Backend.AI ATOM+プラグインが必要です。", + "DescATOMPlusSupport": "Rebellions ATOM+ アクセラレータを使用します。" }, "notification": { "SuccessfullyUpdated": "正常に更新されました", diff --git a/resources/i18n/ko.json b/resources/i18n/ko.json index 4b54c4606f..093fd6b145 100644 --- a/resources/i18n/ko.json +++ b/resources/i18n/ko.json @@ -411,6 +411,7 @@ "EnvironmentAndVersion": "환경 및 버전", "Tags": "태그", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU 사용중", "ForceTerminateWarningMsg": "실제 컨테이너 상태와 상관 없이 세션을 종료 또는 취소 처리합니다. 계속하시겠습니까?", "WarningForceTerminateSessions": "경고: 세션 강제 종료", "ForceTerminateWarningMsg2": "세션을 생성하거나 종료했는데 비정상적으로 오랫동안 상태가 변하지 않을 경우에만 사용하십시오.", @@ -1354,7 +1355,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Hyperaccel LPU 가속기를 사용합니다.", "RequireHyperaccelLPUPlugin": "Backend.AI Hyperaccel LPU 플러그인이 필요합니다.", - "SearchPlaceholder": "검색" + "SearchPlaceholder": "검색", + "Gaudi2Support": "Gaudi 2 지원", + "RequireGaudi2Plugin": "Backend.AI Gaudi 2 플러그인이 필요합니다.", + "DescGaudi2Support": "Intel Gaudi 2 가속기 사용", + "ATOMPlusSupport": "ATOM+ 지원", + "RequireATOMPlusPlugin": "Backend.AI ATOM+ 플러그인이 필요합니다.", + "DescATOMPlusSupport": "Rebellions ATOM+ 가속기를 사용." }, "notification": { "SuccessfullyUpdated": "성공적으로 수정되었습니다.", diff --git a/resources/i18n/mn.json b/resources/i18n/mn.json index 3dc87404d5..92ad0c4d21 100644 --- a/resources/i18n/mn.json +++ b/resources/i18n/mn.json @@ -412,6 +412,7 @@ "EnvironmentAndVersion": "Хүрээлэн буй орчин ба хувилбар", "Tags": "Шошго", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Идэвхжүүлсэн", "ForceTerminateWarningMsg": "Энэ үйлдэл нь одоогийн байдлаас үл хамааран сессийг дуусгах эсвэл цуцлах болно. \nЧи итгэлтэй байна уу?", "WarningForceTerminateSessions": "Анхааруулга: Сешн(үүд)-ийг хүчээр зогсоох", "ForceTerminateWarningMsg2": "Үндэслэлгүй удаан хугацаанд төр өөрчлөгдөөгүй үед л гүйцэтгэнэ.", @@ -1243,7 +1244,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Hyperaccel LPU хурдасгуурыг ашигла.", "RequireHyperaccelLPUPlugin": "Backend.AI Hyperaccel LPU Plugin шаардлагатай.", - "SearchPlaceholder": "Хайх" + "SearchPlaceholder": "Хайх", + "Gaudi2Support": "Gaudi 2 дэмжлэг", + "RequireGaudi2Plugin": "Backend.AI Gaudi 2 Plugin шаардлагатай.", + "DescGaudi2Support": "Intel Gaudi 2 хурдасгуурыг ашигла", + "ATOMPlusSupport": "ATOM+ дэмжлэг", + "RequireATOMPlusPlugin": "Backend.AI ATOM+ Plugin шаардлагатай.", + "DescATOMPlusSupport": "Rebellions ATOM+ хурдасгуурыг ашигла." }, "notification": { "SuccessfullyUpdated": "Амжилттай шинэчлэгдсэн", diff --git a/resources/i18n/ms.json b/resources/i18n/ms.json index af35afcd06..6c5ea4ba01 100644 --- a/resources/i18n/ms.json +++ b/resources/i18n/ms.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Persekitaran dan Versi", "Tags": "Tag", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Didayakan", "ForceTerminateWarningMsg": "Tindakan ini akan menamatkan atau membatalkan sesi tanpa mengira status semasanya. \nAdakah anda pasti?", "WarningForceTerminateSessions": "Amaran: Tamatkan Sesi Paksa", "ForceTerminateWarningMsg2": "Laksanakan hanya apabila keadaan tidak berubah untuk tempoh masa yang tidak munasabah.", @@ -1241,7 +1242,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Gunakan pemecut LPU Hyperaccel.", "RequireHyperaccelLPUPlugin": "Memerlukan Backend.AI Hyperaccel LPU Plugin.", - "SearchPlaceholder": "Cari" + "SearchPlaceholder": "Cari", + "Gaudi2Support": "Sokongan Gaudi 2", + "RequireGaudi2Plugin": "Memerlukan Backend.AI Gaudi 2 Plugin.", + "DescGaudi2Support": "Gunakan pemecut intel Gaudi 2", + "ATOMPlusSupport": "Sokongan ATOM+", + "RequireATOMPlusPlugin": "Memerlukan Plugin Backend.AI ATOM+.", + "DescATOMPlusSupport": "Gunakan pemecut ATOM+ Rebellions." }, "notification": { "SuccessfullyUpdated": "Berjaya Dikemas kini", diff --git a/resources/i18n/pl.json b/resources/i18n/pl.json index 680f88c270..be7e50e431 100644 --- a/resources/i18n/pl.json +++ b/resources/i18n/pl.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Środowisko i wersja", "Tags": "Tagi", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Włączony", "ForceTerminateWarningMsg": "Ta czynność zakończy lub anuluje sesję niezależnie od jej bieżącego statusu. \nJesteś pewny?", "WarningForceTerminateSessions": "Ostrzeżenie: wymuś zakończenie sesji", "ForceTerminateWarningMsg2": "Wykonaj tylko wtedy, gdy stan nie zmienia się przez nieracjonalnie długi okres czasu.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Użyj akceleratora Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Wymaga wtyczki Backend.AI Hyperaccel LPU.", - "SearchPlaceholder": "Wyszukiwanie" + "SearchPlaceholder": "Wyszukiwanie", + "Gaudi2Support": "Wsparcie Gaudiego 2", + "RequireGaudi2Plugin": "Wymaga wtyczki Backend.AI Gaudi 2.", + "DescGaudi2Support": "Użyj akceleratora Intel Gaudi 2", + "ATOMPlusSupport": "Wsparcie ATOM+", + "RequireATOMPlusPlugin": "Wymaga wtyczki Backend.AI ATOM+.", + "DescATOMPlusSupport": "Użyj akceleratora Rebellions ATOM+." }, "notification": { "SuccessfullyUpdated": "Pomyślnie zaktualizowano", diff --git a/resources/i18n/pt-BR.json b/resources/i18n/pt-BR.json index 95b449c2e7..7a01b097ae 100644 --- a/resources/i18n/pt-BR.json +++ b/resources/i18n/pt-BR.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Ambiente e versão", "Tags": "Tag", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Habilitado", "ForceTerminateWarningMsg": "Esta ação encerrará ou cancelará a sessão independentemente de seu status atual. \nTem certeza?", "WarningForceTerminateSessions": "Aviso: forçar o encerramento de sessões", "ForceTerminateWarningMsg2": "Execute somente quando o estado não mudar por um período de tempo excessivamente longo.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Use o acelerador Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Requer plug-in Backend.AI Hyperaccel LPU.", - "SearchPlaceholder": "Pesquisar" + "SearchPlaceholder": "Pesquisar", + "Gaudi2Support": "Apoio Gaudí 2", + "RequireGaudi2Plugin": "Requer plug-in Backend.AI Gaudi 2.", + "DescGaudi2Support": "Use o acelerador Intel Gaudi 2", + "ATOMPlusSupport": "Suporte ATOM+", + "RequireATOMPlusPlugin": "Requer plug-in Backend.AI ATOM+.", + "DescATOMPlusSupport": "Use o acelerador Rebellions ATOM+." }, "notification": { "SuccessfullyUpdated": "Atualizado com sucesso", diff --git a/resources/i18n/pt.json b/resources/i18n/pt.json index 4387ca4019..23dd6b67d3 100644 --- a/resources/i18n/pt.json +++ b/resources/i18n/pt.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Ambiente e versão", "Tags": "Tag", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Habilitado", "ForceTerminateWarningMsg": "Esta ação encerrará ou cancelará a sessão independentemente de seu status atual. \nTem certeza?", "WarningForceTerminateSessions": "Aviso: forçar o encerramento de sessões", "ForceTerminateWarningMsg2": "Execute somente quando o estado não mudar por um período de tempo excessivamente longo.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Use o acelerador Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Requer plug-in Backend.AI Hyperaccel LPU.", - "SearchPlaceholder": "Pesquisar" + "SearchPlaceholder": "Pesquisar", + "Gaudi2Support": "Apoio Gaudí 2", + "RequireGaudi2Plugin": "Requer plug-in Backend.AI Gaudi 2.", + "DescGaudi2Support": "Use o acelerador Intel Gaudi 2", + "ATOMPlusSupport": "Suporte ATOM+", + "RequireATOMPlusPlugin": "Requer plug-in Backend.AI ATOM+.", + "DescATOMPlusSupport": "Use o acelerador Rebellions ATOM+." }, "notification": { "SuccessfullyUpdated": "Atualizado com sucesso", diff --git a/resources/i18n/ru.json b/resources/i18n/ru.json index 110ebec26b..2edaff0a4c 100644 --- a/resources/i18n/ru.json +++ b/resources/i18n/ru.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Окружающая среда и версия", "Tags": "Теги", "fGPU": "фГПУ", + "Gaudi2Enabled": "Gaudi 2 NPU Включено", "ForceTerminateWarningMsg": "Это действие завершит или отменит сеанс независимо от его текущего статуса. \nВы уверены?", "WarningForceTerminateSessions": "Предупреждение: принудительно завершить сеанс(ы)", "ForceTerminateWarningMsg2": "Выполнять только тогда, когда состояние не меняется в течение неоправданно длительного периода времени.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Используйте ускоритель Hyperaccel LPU.", "RequireHyperaccelLPUPlugin": "Требуется плагин Backend.AI Hyperaccel LPU.", - "SearchPlaceholder": "Поиск" + "SearchPlaceholder": "Поиск", + "Gaudi2Support": "Поддержка Гауди 2", + "RequireGaudi2Plugin": "Требуется плагин Backend.AI Gaudi 2.", + "DescGaudi2Support": "Используйте ускоритель Intel Gaudi 2", + "ATOMPlusSupport": "Поддержка АТОМ+", + "RequireATOMPlusPlugin": "Требуется плагин Backend.AI ATOM+.", + "DescATOMPlusSupport": "Используйте ускоритель Rebellions ATOM+." }, "notification": { "SuccessfullyUpdated": "Успешно обновлено", diff --git a/resources/i18n/tr.json b/resources/i18n/tr.json index 7c691490c2..d0e6f6ecc4 100644 --- a/resources/i18n/tr.json +++ b/resources/i18n/tr.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Ortam ve Sürüm", "Tags": "Etiketler", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Etkinleştirilmiş", "ForceTerminateWarningMsg": "Bu eylem, mevcut durumuna bakılmaksızın oturumu sonlandıracak veya iptal edecektir. \nEmin misin?", "WarningForceTerminateSessions": "Uyarı: Oturumları Sonlandırmaya Zorla", "ForceTerminateWarningMsg2": "Yalnızca durum makul olmayan uzun bir süre boyunca değişmediğinde yürütün.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Hyperaccel LPU hızlandırıcısını kullanın.", "RequireHyperaccelLPUPlugin": "Backend.AI Hyperaccel LPU Eklentisi gerektirir.", - "SearchPlaceholder": "Arama" + "SearchPlaceholder": "Arama", + "Gaudi2Support": "Gaudi 2 Desteği", + "RequireGaudi2Plugin": "Backend.AI Gaudi 2 Eklentisi gerektirir.", + "DescGaudi2Support": "Intel Gaudi 2 hızlandırıcıyı kullanın", + "ATOMPlusSupport": "ATOM+ Desteği", + "RequireATOMPlusPlugin": "Backend.AI ATOM+ Eklentisi gerektirir.", + "DescATOMPlusSupport": "Rebellions ATOM+ hızlandırıcısını kullanın." }, "notification": { "SuccessfullyUpdated": "Başarıyla güncellendi", diff --git a/resources/i18n/vi.json b/resources/i18n/vi.json index c50dd71461..9f123f399f 100644 --- a/resources/i18n/vi.json +++ b/resources/i18n/vi.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "Môi trường và phiên bản", "Tags": "Thẻ", "fGPU": "fGPU", + "Gaudi2Enabled": "Gaudi 2 NPU Đã bật", "ForceTerminateWarningMsg": "Hành động này sẽ chấm dứt hoặc hủy phiên bất kể trạng thái hiện tại của nó. \nBạn có chắc không?", "WarningForceTerminateSessions": "Cảnh báo: Buộc chấm dứt (các) phiên", "ForceTerminateWarningMsg2": "Chỉ thực hiện khi trạng thái không thay đổi trong một khoảng thời gian dài không hợp lý.", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "Sử dụng bộ tăng tốc LPU Hyperaccel.", "RequireHyperaccelLPUPlugin": "Yêu cầu Plugin LPU Backend.AI Hyperaccel.", - "SearchPlaceholder": "Tìm kiếm" + "SearchPlaceholder": "Tìm kiếm", + "Gaudi2Support": "Hỗ trợ Gaudi 2", + "RequireGaudi2Plugin": "Yêu cầu Plugin Backend.AI Gaudi 2.", + "DescGaudi2Support": "Sử dụng bộ tăng tốc intel Gaudi 2", + "ATOMPlusSupport": "Hỗ trợ ATOM+", + "RequireATOMPlusPlugin": "Yêu cầu Plugin Backend.AI ATOM+.", + "DescATOMPlusSupport": "Sử dụng máy gia tốc ATOM+ của Rebellions." }, "notification": { "SuccessfullyUpdated": "Cập nhật thành công", diff --git a/resources/i18n/zh-CN.json b/resources/i18n/zh-CN.json index 4d83afabd3..2e95bbf6c8 100644 --- a/resources/i18n/zh-CN.json +++ b/resources/i18n/zh-CN.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "环境及版本", "Tags": "标签", "fGPU": "GPU", + "Gaudi2Enabled": "Gaudi 2 NPU 启用", "ForceTerminateWarningMsg": "无论会话当前状态如何,此操作都将终止或取消会话。\n你确定吗?", "WarningForceTerminateSessions": "警告:强制终止会话", "ForceTerminateWarningMsg2": "仅当状态在不合理的长时间内没有发生变化时才执行。", @@ -1242,7 +1243,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "使用Hyperaccel LPU加速器。", "RequireHyperaccelLPUPlugin": "需要 Backend.AI Hyperaccel LPU 插件。", - "SearchPlaceholder": "搜索" + "SearchPlaceholder": "搜索", + "Gaudi2Support": "Gaudi 2 支持", + "RequireGaudi2Plugin": "需要 Backend.AI Gaudi 2 插件。", + "DescGaudi2Support": "使用intel Gaudi 2加速器", + "ATOMPlusSupport": "ATOM+支持", + "RequireATOMPlusPlugin": "需要 Backend.AI ATOM+ 插件。", + "DescATOMPlusSupport": "使用 Rebellions ATOM+ 加速器。" }, "notification": { "SuccessfullyUpdated": "成功更新", diff --git a/resources/i18n/zh-TW.json b/resources/i18n/zh-TW.json index 9ed9040172..11aaf9e3b1 100644 --- a/resources/i18n/zh-TW.json +++ b/resources/i18n/zh-TW.json @@ -410,6 +410,7 @@ "EnvironmentAndVersion": "環境及版本", "Tags": "標籤", "fGPU": "GPU", + "Gaudi2Enabled": "Gaudi 2 NPU 啟用", "ForceTerminateWarningMsg": "無論會話目前狀態如何,此操作都會終止或取消會話。\n你確定嗎?", "WarningForceTerminateSessions": "警告:強制終止會話", "ForceTerminateWarningMsg2": "僅當狀態在不合理的長時間內沒有發生變化時才執行。", @@ -1241,7 +1242,13 @@ "HyperaccelLPUsupport": "Hyperaccel LPU", "DescHyperaccelLPUsupport": "使用Hyperaccel LPU加速器。", "RequireHyperaccelLPUPlugin": "需要 Backend.AI Hyperaccel LPU 插件。", - "SearchPlaceholder": "搜索" + "SearchPlaceholder": "搜索", + "Gaudi2Support": "高第 2 支持", + "RequireGaudi2Plugin": "需要 Backend.AI Gaudi 2 插件。", + "DescGaudi2Support": "使用intel Gaudi 2加速器", + "ATOMPlusSupport": "ATOM+支持", + "RequireATOMPlusPlugin": "需要 Backend.AI ATOM+ 插件。", + "DescATOMPlusSupport": "Use Rebellions ATOM+ accelerator" }, "notification": { "SuccessfullyUpdated": "成功更新", diff --git a/resources/icons/gaudi.svg b/resources/icons/gaudi.svg new file mode 100644 index 0000000000..fcc3fd55f2 --- /dev/null +++ b/resources/icons/gaudi.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/backend-ai-agent-list.ts b/src/components/backend-ai-agent-list.ts index ac0f2495f7..fba6321d56 100644 --- a/src/components/backend-ai-agent-list.ts +++ b/src/components/backend-ai-agent-list.ts @@ -531,6 +531,24 @@ export default class BackendAIAgentList extends BackendAIPage { agents[objectKey].used_atom_plus_slots_ratio * 100 ).toFixed(2); } + if ('gaudi2.device' in available_slots) { + agents[objectKey].gaudi2_slots = parseInt( + available_slots['gaudi2.device'], + ); + if ('gaudi2.device' in occupied_slots) { + agents[objectKey].used_gaudi2_slots = parseInt( + occupied_slots['gaudi2.device'], + ); + } else { + agents[objectKey].used_gaudi2_slots = 0; + } + agents[objectKey].used_gaudi2_slots_ratio = + agents[objectKey].used_gaudi2_slots / + agents[objectKey].gaudi2_slots; + agents[objectKey].total_gaudi2_percent = ( + agents[objectKey].used_gaudi2_slots_ratio * 100 + ).toFixed(2); + } if ('warboy.device' in available_slots) { agents[objectKey].warboy_slots = parseInt( available_slots['warboy.device'], @@ -1227,6 +1245,31 @@ export default class BackendAIAgentList extends BackendAIPage { ` : html``} + ${rowData.item.gaudi2_slots + ? html` +
+
+ + + ${rowData.item.used_gaudi2_slots}/${rowData.item + .gaudi2_slots} + + Gaudi 2 +
+ + +
+ ` + : html``} ${rowData.item.warboy_slots ? html`
element) * @param {object} rowData */ - resourceRenderer(root, column?, rowData?) { + allocationRenderer(root, column?, rowData?) { render( // language=HTML html` @@ -627,7 +648,7 @@ export default class BackendAIAgentSummaryList extends BackendAIPage {
` @@ -652,7 +673,7 @@ export default class BackendAIAgentSummaryList extends BackendAIPage { ` @@ -676,7 +697,7 @@ export default class BackendAIAgentSummaryList extends BackendAIPage { ` @@ -700,7 +721,7 @@ export default class BackendAIAgentSummaryList extends BackendAIPage { ` @@ -724,7 +745,32 @@ export default class BackendAIAgentSummaryList extends BackendAIPage { + + ` + : html``} + ${rowData.item.gaudi2_slots + ? html` +
+
+ + + ${rowData.item.used_gaudi2_slots}/${rowData.item + .gaudi2_slots} + + Gaudi 2 +
+ +
` @@ -749,7 +795,7 @@ export default class BackendAIAgentSummaryList extends BackendAIPage { ` @@ -774,7 +820,7 @@ export default class BackendAIAgentSummaryList extends BackendAIPage { ` @@ -799,7 +845,7 @@ export default class BackendAIAgentSummaryList extends BackendAIPage { ` @@ -868,7 +914,7 @@ export default class BackendAIAgentSummaryList extends BackendAIPage { resizable auto-width header="${_t('agent.Allocation')}" - .renderer="${this._boundResourceRenderer}" + .renderer="${this._boundAllocationRenderer}" > ${this._enableAgentSchedulable ? html` diff --git a/src/components/backend-ai-agent-view.ts b/src/components/backend-ai-agent-view.ts deleted file mode 100644 index 04ededd1d0..0000000000 --- a/src/components/backend-ai-agent-view.ts +++ /dev/null @@ -1,218 +0,0 @@ -/** - @license - Copyright (c) 2015-2024 Lablup Inc. All rights reserved. - */ -import './backend-ai-agent-list'; -import { BackendAiStyles } from './backend-ai-general-styles'; -import { BackendAIPage } from './backend-ai-page'; -import './backend-ai-resource-group-list'; -import './backend-ai-storage-proxy-list'; -import './lablup-activity-panel'; -import '@material/mwc-tab'; -import '@material/mwc-tab-bar'; -import { css, CSSResultGroup, html } from 'lit'; -import { translate as _t } from 'lit-translate'; -import { customElement, state } from 'lit/decorators.js'; - -type Status = 'active' | 'inactive'; -type Tab = - | 'running-lists' - | 'terminated-lists' - | 'storage-proxy-lists' - | 'scaling-group-lists'; - -/** - Backend.AI Agent view page - - Example: - - - ... content ... - - -@group Backend.AI Web UI - @element backend-ai-agent-view - */ - -@customElement('backend-ai-agent-view') -export default class BackendAIAgentView extends BackendAIPage { - @state() _status: Status = 'inactive'; - @state() _tab: Tab = 'running-lists'; - @state() enableStorageProxy = false; - - static get styles(): CSSResultGroup { - return [ - BackendAiStyles, - // language=CSS - css` - @media screen and (max-width: 805px) { - mwc-tab { - --mdc-typography-button-font-size: 10px; - } - } - `, - ]; - } - - firstUpdated() { - if ( - typeof globalThis.backendaiclient === 'undefined' || - globalThis.backendaiclient === null || - globalThis.backendaiclient.ready === false - ) { - document.addEventListener( - 'backend-ai-connected', - () => { - this.enableStorageProxy = - globalThis.backendaiclient.supports('storage-proxy'); - }, - true, - ); - } else { - this.enableStorageProxy = - globalThis.backendaiclient.supports('storage-proxy'); - } - } - - /** - * Change agent's backend.ai running state. - * - * @param {Boolean} active - */ - async _viewStateChanged(active: boolean) { - await this.updateComplete; - if (!active) { - ( - this.shadowRoot?.querySelector('#running-agents') as BackendAIPage - ).active = false; - ( - this.shadowRoot?.querySelector('#terminated-agents') as BackendAIPage - ).active = false; - ( - this.shadowRoot?.querySelector('#scaling-groups') as BackendAIPage - ).active = false; - this._status = 'inactive'; - return; - } - ( - this.shadowRoot?.querySelector('#running-agents') as BackendAIPage - ).active = true; - ( - this.shadowRoot?.querySelector('#terminated-agents') as BackendAIPage - ).active = true; - ( - this.shadowRoot?.querySelector('#scaling-groups') as BackendAIPage - ).active = false; - this._status = 'active'; - } - - /** - * Display the tab. - * - * @param {mwc-tab} tab - */ - _showTab(tab) { - const els = this.shadowRoot?.querySelectorAll( - '.tab-content', - ) as NodeListOf; - for (let x = 0; x < els.length; x++) { - els[x].style.display = 'none'; - } - ( - this.shadowRoot?.querySelector('#' + tab.title) as HTMLElement - ).style.display = 'block'; - this._tab = tab.title; - } - - render() { - // language=HTML - return html` - - -
-

- - - - - ${this.enableStorageProxy - ? html` - - ` - : html``} - - -
-

-
- -
- - ${this.enableStorageProxy - ? html` - - ` - : html``} - -
-
- `; - } -} - -declare global { - interface HTMLElementTagNameMap { - 'backend-ai-agent-view': BackendAIAgentView; - } -} diff --git a/src/components/backend-ai-credential-list.ts b/src/components/backend-ai-credential-list.ts index e99ce3f04f..d893566130 100644 --- a/src/components/backend-ai-credential-list.ts +++ b/src/components/backend-ai-credential-list.ts @@ -394,6 +394,16 @@ export default class BackendAICredentialList extends BackendAIPage { ) { keypair['total_resource_slots'].atom_plus_device = '-'; } + if ('gaudi2.device' in keypair['total_resource_slots']) { + keypair['total_resource_slots'].gaudi2_device = + keypair['total_resource_slots']['gaudi2.device']; + } + if ( + 'gaudi2.device' in keypair['total_resource_slots'] === false && + keypair['default_for_unspecified'] === 'UNLIMITED' + ) { + keypair['total_resource_slots'].gaudi2_device = '-'; + } if ('warboy.device' in keypair['total_resource_slots']) { keypair['total_resource_slots'].warboy_device = keypair['total_resource_slots']['warboy.device']; @@ -426,6 +436,7 @@ export default class BackendAICredentialList extends BackendAIPage { 'ipu_device', 'atom_device', 'atom_plus_device', + 'gaudi2_device', 'warboy_device', 'hyperaccel_lpu_device', ].forEach((slot) => { diff --git a/src/components/backend-ai-environment-list.ts b/src/components/backend-ai-environment-list.ts index c3142c280b..921b77425b 100644 --- a/src/components/backend-ai-environment-list.ts +++ b/src/components/backend-ai-environment-list.ts @@ -86,6 +86,7 @@ export default class BackendAIEnvironmentList extends BackendAIPage { @query('#modify-image-ipu') modifyImageIpu!: Button; @query('#modify-image-atom') modifyImageAtom!: Button; @query('#modify-image-atom-plus') modifyImageAtomPlus!: Button; + @query('#modify-image-gaudi-2') modifyImageGaudi2!: Button; @query('#modify-image-warboy') modifyImageWarboy!: Button; @query('#modify-image-hyperaccel-lpu') modifyImageHyperaccelLPU!: Button; @query('#delete-app-info-dialog') deleteAppInfoDialog!: BackendAIDialog; @@ -765,7 +766,10 @@ export default class BackendAIEnvironmentList extends BackendAIPage { * Decode backend.ai service ports. */ _decodeServicePort() { - if (this.modifiedImage.labels['ai.backend.service-ports'] === '') { + if ( + this.modifiedImage?.labels?.['ai.backend.service-ports'] === '' || + this.modifiedImage?.labels?.['ai.backend.service-ports'] === undefined + ) { this.servicePorts = []; } else { this.servicePorts = this.modifiedImage.labels['ai.backend.service-ports'] @@ -908,6 +912,26 @@ export default class BackendAIEnvironmentList extends BackendAIPage { ` : html``} + ${rowData.item.gaudi2_device_limit_min + ? html` +
+
+ + ${rowData.item.gaudi2_device_limit_min} + ~ + + ${this._markIfUnlimited( + rowData.item.gaudi2_device_limit_max, + )} + + Gaudi 2 +
+
+ ` + : html``} ${rowData.item.atom_plus_device_limit_min ? html`
diff --git a/src/components/backend-ai-resource-broker.ts b/src/components/backend-ai-resource-broker.ts index f7119e6537..a7fc5902ef 100644 --- a/src/components/backend-ai-resource-broker.ts +++ b/src/components/backend-ai-resource-broker.ts @@ -405,6 +405,7 @@ export default class BackendAiResourceBroker extends BackendAIPage { 'ipu.device': 'ipu_device', 'atom.device': 'atom_device', 'atom-plus.device': 'atom_plus_device', + 'gaudi2.device': 'gaudi2_device', 'warboy.device': 'warboy_device', 'hyperaccel-lpu.device': 'hyperaccel_lpu_device', }; @@ -561,6 +562,7 @@ export default class BackendAiResourceBroker extends BackendAIPage { 'ipu.device': 'ipu_device', 'atom.device': 'atom_device', 'atom-plus.device': 'atom_plus_device', + 'gaudi2.device': 'gaudi2_device', 'warboy.device': 'warboy_device', 'hyperaccel-lpu.device': 'hyperaccel_lpu_device', }; @@ -574,6 +576,7 @@ export default class BackendAiResourceBroker extends BackendAIPage { 'ipu.device': 'ipu_device', 'atom.device': 'atom_device', 'atom-plus.device': 'atom_plus_device', + 'gaudi2.device': 'gaudi2_device', 'warboy.device': 'warboy_device', 'hyperaccel-lpu.device': 'hyperaccel_lpu_device', }; @@ -842,22 +845,23 @@ export default class BackendAiResourceBroker extends BackendAIPage { occupied: { cpu: 0, mem: 0, cuda_device: 0, cuda_shares: 0 }, }, ); - resourceGroupSlots.remaining = {}; - Object.keys(resourceGroupSlots.available).forEach((key) => { - resourceGroupSlots.remaining[key] = - resourceGroupSlots.available[key] - - resourceGroupSlots.occupied[key]; - }); - - this.total_resource_group_slot = this._roundResourceDecimalPlaces( - resourceGroupSlots.available, - ); - // This value is purposely set to the remaining resource group slots - // when `hideAgents` is `true`. There are some cases it is more useful - // to display the remaining slots. - this.used_resource_group_slot = this._roundResourceDecimalPlaces( - resourceGroupSlots.remaining, - ); + if (resourceGroupSlots !== undefined) { + resourceGroupSlots.remaining = {}; + Object.keys(resourceGroupSlots.available).forEach((key) => { + resourceGroupSlots.remaining[key] = + resourceGroupSlots.available[key] - + resourceGroupSlots.occupied[key]; + }); + this.total_resource_group_slot = this._roundResourceDecimalPlaces( + resourceGroupSlots.available, + ); + // This value is purposely set to the remaining resource group slots + // when `hideAgents` is `true`. There are some cases it is more useful + // to display the remaining slots. + this.used_resource_group_slot = this._roundResourceDecimalPlaces( + resourceGroupSlots.remaining, + ); + } } else { this.total_resource_group_slot = this._roundResourceDecimalPlaces( total_resource_group_slot, diff --git a/src/components/backend-ai-resource-monitor.ts b/src/components/backend-ai-resource-monitor.ts index f5ada950e9..8e7faefce8 100644 --- a/src/components/backend-ai-resource-monitor.ts +++ b/src/components/backend-ai-resource-monitor.ts @@ -1169,6 +1169,69 @@ export default class BackendAiResourceMonitor extends BackendAIPage {
` : html``} + ${this.total_slot.gaudi2_device + ? html` +
+
+ Gaudi 2 +
+
+ + +
+
+ + ${this._numberWithPostfix( + this._prefixFormatWithoutTrailingZeros( + this.used_resource_group_slot_percent.gaudi2_device, + 1, + ), + '%', + )} + + + ${this._numberWithPostfix( + this._prefixFormatWithoutTrailingZeros( + this.used_slot_percent.gaudi2_device, + 1, + ), + '%', + )} + +
+
+ ` + : html``} ${this.total_slot.warboy_device ? html`
diff --git a/src/components/backend-ai-resource-panel.ts b/src/components/backend-ai-resource-panel.ts index 1a0db5e1c7..332dd60129 100644 --- a/src/components/backend-ai-resource-panel.ts +++ b/src/components/backend-ai-resource-panel.ts @@ -80,6 +80,8 @@ export default class BackendAIResourcePanel extends BackendAIPage { @property({ type: Number }) atom_used = 0; @property({ type: Number }) atom_plus_total = 0; @property({ type: Number }) atom_plus_used = 0; + @property({ type: Number }) gaudi2_total = 0; + @property({ type: Number }) gaudi2_used = 0; @property({ type: Number }) warboy_total = 0; @property({ type: Number }) warboy_used = 0; @property({ type: Number }) hyperaccel_lpu_total = 0; @@ -344,6 +346,9 @@ export default class BackendAIResourcePanel extends BackendAIPage { this.resources.atom_plus = {}; this.resources.atom_plus.total = 0; this.resources.atom_plus.used = 0; + this.resources.gaudi2 = {}; + this.resources.gaudi2.total = 0; + this.resources.gaudi2.used = 0; this.resources.warboy = {}; this.resources.warboy.total = 0; this.resources.warboy.used = 0; @@ -407,6 +412,11 @@ export default class BackendAIResourcePanel extends BackendAIPage { } else { this.atom_plus_total = this.resources['atom-plus.device'].total; } + if (isNaN(this.resources['gaudi2.device'].total)) { + this.gaudi2_total = 0; + } else { + this.gaudi2_total = this.resources['gaudi2.device'].total; + } if (isNaN(this.resources['warboy.device'].total)) { this.warboy_total = 0; } else { @@ -686,6 +696,7 @@ export default class BackendAIResourcePanel extends BackendAIPage { this.ipu_total || this.atom_total || this.atom_plus_total || + this.gaudi2_total || this.warboy_total || this.hyperaccel_lpu_total ? html` @@ -1003,6 +1014,47 @@ export default class BackendAIResourcePanel extends BackendAIPage {
` : html``} + ${this.gaudi2_total + ? html` +
+
+ + +
+
+ + ${this._prefixFormatWithoutTrailingZeros( + this.gaudi2_used, + 1, + ) + '%'} + + +
+
+ ` + : html``} ${this.warboy_total ? html`
diff --git a/src/components/backend-ai-session-launcher.ts b/src/components/backend-ai-session-launcher.ts index 9eb25430a7..c4b8acfe26 100644 --- a/src/components/backend-ai-session-launcher.ts +++ b/src/components/backend-ai-session-launcher.ts @@ -125,6 +125,10 @@ export default class BackendAiSessionLauncher extends BackendAIPage { min: '0', max: '0', }; + @property({ type: Object }) gaudi2_device_metric = { + min: '0', + max: '0', + }; @property({ type: Object }) warboy_device_metric = { min: '0', max: '0', @@ -204,6 +208,7 @@ export default class BackendAiSessionLauncher extends BackendAIPage { @property({ type: Number }) max_ipu_device_per_container = 8; @property({ type: Number }) max_atom_device_per_container = 4; @property({ type: Number }) max_atom_plus_device_per_container = 4; + @property({ type: Number }) max_gaudi2_device_per_container = 4; @property({ type: Number }) max_warboy_device_per_container = 4; @property({ type: Number }) max_hyperaccel_lpu_device_per_container = 4; @property({ type: Number }) max_shm_per_container = 8; @@ -993,6 +998,9 @@ export default class BackendAiSessionLauncher extends BackendAIPage { this.max_atom_plus_device_per_container = globalThis.backendaiclient._config.maxATOMPlUSDevicesPerContainer || 8; + this.max_gaudi2_device_per_container = + globalThis.backendaiclient._config.maxGaudi2DevicesPerContainer || + 8; this.max_warboy_device_per_container = globalThis.backendaiclient._config.maxWarboyDevicesPerContainer || 8; @@ -1046,6 +1054,8 @@ export default class BackendAiSessionLauncher extends BackendAIPage { globalThis.backendaiclient._config.maxATOMDevicesPerContainer || 8; this.max_atom_plus_device_per_container = globalThis.backendaiclient._config.maxATOMPlUSDevicesPerContainer || 8; + this.max_gaudi2_device_per_container = + globalThis.backendaiclient._config.maxGaudi2DevicesPerContainer || 8; this.max_warboy_device_per_container = globalThis.backendaiclient._config.maxWarboyDevicesPerContainer || 8; this.max_hyperaccel_lpu_device_per_container = @@ -1686,6 +1696,9 @@ export default class BackendAiSessionLauncher extends BackendAIPage { case 'atom-plus.device': config['atom-plus.device'] = this.gpu_request; break; + case 'gaudi2.device': + config['gaudi2.device'] = this.gpu_request; + break; case 'warboy.device': config['warboy.device'] = this.gpu_request; break; @@ -2330,6 +2343,7 @@ export default class BackendAiSessionLauncher extends BackendAIPage { 'ipu_device', 'atom_device', 'atom_plus_device', + 'gaudi2_device', 'warboy_device', 'hyperaccel_lpu_device', ].forEach((slot) => { @@ -2728,6 +2742,58 @@ export default class BackendAiSessionLauncher extends BackendAIPage { this._NPUDeviceNameOnSlider = 'ATOM+'; this.npu_device_metric = atom_plus_device_metric; } + if (item.key === 'gaudi2.device' || item.key === 'gaudi.device') { + const gaudi2_device_metric = { ...item }; + gaudi2_device_metric.min = parseInt(gaudi2_device_metric.min); + if ('gaudi2.device' in this.userResourceLimit) { + if ( + parseInt(gaudi2_device_metric.max) !== 0 && + gaudi2_device_metric.max !== 'Infinity' && + !isNaN(gaudi2_device_metric.max) && + gaudi2_device_metric.max != null + ) { + gaudi2_device_metric.max = Math.min( + parseInt(gaudi2_device_metric.max), + parseInt(this.userResourceLimit['gaudi2.device']), + available_slot['gaudi2_device'], + this.max_gaudi2_device_per_container, + ); + } else { + gaudi2_device_metric.max = Math.min( + parseInt(this.userResourceLimit['gaudi2.device']), + parseInt(available_slot['gaudi2_device']), + this.max_gaudi2_device_per_container, + ); + } + } else { + if ( + parseInt(gaudi2_device_metric.max) !== 0 && + gaudi2_device_metric.max !== 'Infinity' && + !isNaN(gaudi2_device_metric.max) && + gaudi2_device_metric.max != null + ) { + gaudi2_device_metric.max = Math.min( + parseInt(gaudi2_device_metric.max), + parseInt(available_slot['gaudi2_device']), + this.max_gaudi2_device_per_container, + ); + } else { + gaudi2_device_metric.max = Math.min( + parseInt(this.available_slot['gaudi2_device']), + this.max_gaudi2_device_per_container, + ); + } + } + if (gaudi2_device_metric.min >= gaudi2_device_metric.max) { + if (gaudi2_device_metric.min > gaudi2_device_metric.max) { + gaudi2_device_metric.min = gaudi2_device_metric.max; + disableLaunch = true; + } + this.npuResourceSlider.disabled = true; + } + this._NPUDeviceNameOnSlider = 'Gaudi 2'; + this.npu_device_metric = gaudi2_device_metric; + } if (item.key === 'warboy.device') { const warboy_device_metric = { ...item }; warboy_device_metric.min = parseInt(warboy_device_metric.min); @@ -2777,7 +2843,6 @@ export default class BackendAiSessionLauncher extends BackendAIPage { } this.npuResourceSlider.disabled = true; } - console.log(warboy_device_metric); this._NPUDeviceNameOnSlider = 'Warboy'; this.npu_device_metric = warboy_device_metric; } @@ -2838,7 +2903,6 @@ export default class BackendAiSessionLauncher extends BackendAIPage { } this.npuResourceSlider.disabled = true; } - console.log(hyperaccel_lpu_device_metric); this._NPUDeviceNameOnSlider = 'Hyperaccel LPU'; this.npu_device_metric = hyperaccel_lpu_device_metric; } @@ -3327,6 +3391,7 @@ export default class BackendAiSessionLauncher extends BackendAIPage { const ipu_device = button.ipu_device; const atom_device = button.atom_device; const atom_plus_device = button.atom_plus_device; + const gaudi2_device = button.gaudi2_device; const warboy_device = button.warboy_device; const hyperaccel_lpu_device = button.hyperaccel_lpu_device; @@ -3362,6 +3427,12 @@ export default class BackendAiSessionLauncher extends BackendAIPage { ) { gpu_type = 'atom-plus.device'; gpu_value = atom_plus_device; + } else if ( + typeof gaudi2_device !== 'undefined' && + Number(gaudi2_device) > 0 + ) { + gpu_type = 'gaudi2.device'; + gpu_value = gaudi2_device; } else if ( typeof warboy_device !== 'undefined' && Number(warboy_device) > 0 @@ -4505,6 +4576,7 @@ export default class BackendAiSessionLauncher extends BackendAIPage { 'ipu.device': 'IPU', 'atom.device': 'ATOM', 'atom-plus.device': 'ATOM+', + 'gaudi2.device': 'Gaudi 2', 'warboy.device': 'Warboy', 'hyperaccel-lpu.device': 'Hyperaccel LPU', }; @@ -5211,6 +5283,7 @@ export default class BackendAiSessionLauncher extends BackendAIPage { .ipu_device="${item.ipu_device}" .atom_device="${item.atom_device}" .atom_plus_device="${item.atom_plus_device}" + .gaudi2_device="${item.gaudi2_device}" .warboy_device="${item.warboy_device}" .hyperaccel_lpu_device="${item.hyperaccel_lpu_device}" .shmem="${item.shmem}" @@ -5276,6 +5349,11 @@ export default class BackendAiSessionLauncher extends BackendAIPage { ${item.atom_plus_device} ATOM+ ` : html``} + ${item.gaudi2_device && item.gaudi2_device > 0 + ? html` + ${item.gaudi2_device} Gaudi 2 + ` + : html``} ${item.warboy_device && item.warboy_device > 0 ? html` ${item.warboy_device} Warboy diff --git a/src/components/backend-ai-session-list.ts b/src/components/backend-ai-session-list.ts index 8c8ab8f4cb..c8d9489c85 100644 --- a/src/components/backend-ai-session-list.ts +++ b/src/components/backend-ai-session-list.ts @@ -305,8 +305,11 @@ export default class BackendAISessionList extends BackendAIPage { } img.indicator-icon { - width: 16px; - height: 16px; + max-width: 16px !important; + max-height: 16px !important; + width: auto; + height: auto; + align-self: center; padding-right: 5px; } @@ -1194,6 +1197,11 @@ export default class BackendAISessionList extends BackendAIPage { resourceSlots['atom-plus.device'], ); } + if ('gaudi2.device' in resourceSlots) { + sessions[objectKey].gaudi2_slot = parseInt( + resourceSlots['gaudi2.device'], + ); + } if ('warboy.device' in resourceSlots) { sessions[objectKey].warboy_slot = parseInt( resourceSlots['warboy.device'], @@ -3526,6 +3534,16 @@ ${rowData.item[this.sessionNameField]}ATOM ` : html``} + ${rowData.item.gaudi2_slot + ? html` + + ${rowData.item.gaudi2_slot} + Gaudi 2 + ` + : html``} ${rowData.item.atom_plus_slot ? html`
${_tr('settings.DescCUDAGPUsupport')} - ${ - this.options['cuda_fgpu'] - ? html` -
- ${_t('settings.CUDAGPUdisabledByFGPUsupport')} - ` - : html`` - } + ${this.options['cuda_fgpu'] + ? html` +
+ ${_t('settings.CUDAGPUdisabledByFGPUsupport')} + ` + : html``}
+
+ +
+
+
${_t('settings.Gaudi2Support')}
+
+ ${_tr('settings.DescGaudi2Support')} +
+ ${_t('settings.RequireGaudi2Plugin')} +
+
+
+ +