Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1221055pxb; Fri, 10 Sep 2021 00:29:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpBr/gjeZUJkIEbpiHssVDa6mj+8vyU2fDyrCInwLO5Lpne4GOGwOZvXSPyZbQW4g8b6sM X-Received: by 2002:a17:906:c252:: with SMTP id bl18mr7663427ejb.519.1631258991907; Fri, 10 Sep 2021 00:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631258991; cv=none; d=google.com; s=arc-20160816; b=UpKdVObyIb0vXqm/LfpEIDiWB2nJQaF+KQ9+Iim5y3hK7TJIYQeQnNUKjwYfmtzk1y Ms6hDx++tVZaVg0kO2Ylw642RC8Cn2bmXBJpUJONDji83Z/cbmxfgH6StEPG4x9lsUqz YMVyzaXT7uGoYSyW78FEGgq/7TxqYBXwRSgrkQOswRvDkF6P5c0W6DYZZ0Nz2YPcv3pH 1NkMc8sYQyJLfA9muv6/NxCP4BrGrWeiNe8tftaAqj2aiAamfcVPzkimo1dJ6ctXKKbv gqJ/24M32izdbO9i8zmoFizt9WVOw/zgkQZgLU+yzuEHIkNFqm+5adawrkc3IucfADKf Yufg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=e/aon/mWpT9jEBV4xXDuCYPMB40JgroeSMyJbNSkjtM=; b=n3btqokBKwMrOWdlR3Eo2etCgtfFyPRw2rEPAhhctIVwHacmq7a1aKu3uuWa2siMs+ 631CFuNGWh/zK4A4cBzEyemML6w9XsDKHwCjeY6dnWztKyleHDHkpmQkGW3akzwrLtRH njglnJiOy/YxpB/dKYOipAUFsz4TKjYiF+Uw2/moF2X9S4+MRti9qXlcRcPYHvMpHsNg CFCpGunUAVu22gdGw+MwyG0lJCkfGu38OMwljOT5Rpt3i02s5KY4h/xvTibkgSM58hWf 4YbF+0/yQAru7I5cbFeLqATmoJHmhveRzetcoUUl5UvFLWSPMiTZghdBlWTOP7b3Y1iE Srow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qFCWsm2H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si4247586edv.349.2021.09.10.00.29.23; Fri, 10 Sep 2021 00:29:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qFCWsm2H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231402AbhIJH2h (ORCPT + 99 others); Fri, 10 Sep 2021 03:28:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:47630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbhIJH2e (ORCPT ); Fri, 10 Sep 2021 03:28:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8A7F2611C2 for ; Fri, 10 Sep 2021 07:27:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631258843; bh=e/aon/mWpT9jEBV4xXDuCYPMB40JgroeSMyJbNSkjtM=; h=From:Date:Subject:To:Cc:From; b=qFCWsm2H6z5YEz9OJJn6h/EVXxqIfcc5HEbCv8PkDNHr0g/VjQrvO8cQxYI5Bhgga J4j4QUtNX+zrDnkO9juk1GYhmK8xNkxZEm3Pf16qT+DO/dkCriad5nn/9ETIGmHeqo 5anQ3c/VYoxs+1sGRJhDN/DEzz2QnAVUCmXLZZW8Xh+r8GzSVkk3TTTr43dyoT0Vzu C3mACw6loZElwk08A7IP/dFrHs55dAA0mtW3Q1LMA1ifQ6lEuDwANSx1TUlClE4UzQ LfAKTwWkbGVCW0r5MAP9TE3fn7D2O1bQh0mJvvq9X3avLeDmLkki2vE6YI15FhgUoS 8TpesnNSVTjiw== Received: by mail-ot1-f49.google.com with SMTP id k12-20020a056830150c00b0051abe7f680bso1104603otp.1 for ; Fri, 10 Sep 2021 00:27:23 -0700 (PDT) X-Gm-Message-State: AOAM531rYGTcMF4n57CL9COZszytd6Giy1vx8nYdE3MZfQc8cdwy6EES 1INS5MuxqwJwH/NPaEpjbMo01Ska3lK+hiDa8e4= X-Received: by 2002:a05:6830:12d7:: with SMTP id a23mr3433797otq.102.1631258842905; Fri, 10 Sep 2021 00:27:22 -0700 (PDT) MIME-Version: 1.0 From: Oded Gabbay Date: Fri, 10 Sep 2021 10:26:56 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Habanalabs Open-Source TPC LLVM compiler and SynapseAI Core library To: Greg Kroah-Hartman Cc: mzuckerman@habana.ai, dsinger@habana.ai, Linus Torvalds , Dave Airlie , Daniel Vetter , Jason Gunthorpe , "Linux-Kernel@Vger. Kernel. Org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, Following our conversations a couple of months ago, I'm happy to tell you that Habanalabs has open-sourced its TPC (Tensor Processing Core) LLVM compiler, which is a fork of the LLVM open-source project. The project can be found on Habanalabs GitHub website at: https://github.com/HabanaAI/tpc_llvm There is a companion guide on how to write TPC kernels at: https://docs.habana.ai/en/latest/TPC_User_Guide/TPC_User_Guide.html The guide details the TPC compute engine's architecture, how to write TPC kernels using the TPC-C language, etc. In addition, we have written a reference implementation of the SynapseAI API, called SynapseAI Core, and released its code under the MIT license to the open-source community at: https://github.com/HabanaAI/SynapseAI_Core SynapseAI Core contains all the necessary building blocks to run Deep Learning training on Gaudi, although not as optimized as the closed-source library. The project repository contains a couple of TPC kernels that implement basic DL operators. These kernels can serve as an example of how to implement more complex operators. To work with the Gaudi device, the library calls the Habanalabs kernel driver uAPI through the already open-source hl-thunk library at: https://github.com/HabanaAI/hl-thunk Moreover, the library contains a few tests (and more will follow soon) that demonstrate how to use the SynapseAI API to run workloads which utilize the TPC engines on Gaudi devices. We provided a short readme that explains how to build and run the included tests. It is important to note we provided all the necessary APIs to connect this library to any Deep Learning frameworks by writing appropriate backends in the frameworks and by writing more TPC kernels to implement the different operators. Once the driver(s) for the Gaudi NIC ports will be upstreamed, this library may be used together with IBverbs to perform training on multiple Gaudi devices. Thanks, Oded