microsoft / triton-shared

Shared Middle-Layer for Triton Compilation
MIT License
134 stars 26 forks source link

Add matmul kernel test for CPU backend #67

Closed nhat-nguyen closed 7 months ago

nhat-nguyen commented 7 months ago

Add the latest matmul triton tutorial as a test for the CPU backend. This exposed a bug in the TritonToLinalg pass where we need to initialize the init tensor with all zeroes first since allocated buffers aren't guaranteed to be zero-initialized.

manbearian commented 7 months ago

Yes, no need to fix here... but we really need a way to address this... I wonder if we can modify the tutorials themselves with some conditional code to check if CPU is supported and test CPU back-end if it is?

ian Bearman Principal Software Engineering Manager AI Frameworks: Compilation and Optimization (Maia 100https://azure.microsoft.com/en-us/blog/microsoft-azure-delivers-purpose-built-cloud-infrastructure-in-the-era-of-ai/ and beyond!) Now hiring!https://aka.ms/ianb.jobs

BlackLivesMatter

/ Making your AI faster, cheaper, smarter! /

From: Nhat Nguyen @.> Sent: Wednesday, November 29, 2023 9:42 AM To: microsoft/triton-shared @.> Cc: Ian Bearman @.>; Review requested @.> Subject: Re: [microsoft/triton-shared] Add matmul kernel test for CPU backend (PR #67)

@nhat-nguyen commented on this pull request.


On python/examples/test_matmul.pyhttps://github.com/microsoft/triton-shared/pull/67#discussion_r1409656328:

yea this turns out harder than i expected:

  1. we need to modify the device type from cuda to cpu in the original code anyway
  2. our project is independent from the tutorial code which lives in the triton repo, so we can't directly access those files anyway

- Reply to this email directly, view it on GitHubhttps://github.com/microsoft/triton-shared/pull/67#discussion_r1409656328, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF7M3YVIE6NBG24LVJDKO2LYG5XXRAVCNFSM6AAAAAA77AOFAGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONJVHA3DSNBQGM. You are receiving this because your review was requested.Message ID: @.**@.>>