Skip to content

Commit

Permalink
enabling fp8 gemm on amd
Browse files Browse the repository at this point in the history
Summary:
currently we were trying to import cublas which was getting a `RuntimeError` instead of the moduleNotFound error. adding the exception to the `try except` clause with logged statements

This was caught originally via CI additions we are doing in the next diff for AMD integration. see https://www.internalfb.com/intern/testinfra/diagnostics/4785074862901046.844425121438624.1733874779/ for the failure that caused this diff

Reviewed By: nmacchioni

Differential Revision: D67065556

fbshipit-source-id: ede7042bc85a0d5d487f33d281cb8ab09cff135e
  • Loading branch information
adamomainz authored and facebook-github-bot committed Dec 11, 2024
1 parent 8fabcf4 commit 7b67b0a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tritonbench/operators/fp8_gemm/fp8_gemm.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import argparse
import logging
import os
import statistics

from typing import Any, List, Optional

import torch
import triton
import triton.language as tl

from triton.runtime.jit import reinterpret

from tritonbench.utils.triton_op import (
BenchmarkOperator,
Expand All @@ -20,6 +17,7 @@

from .tutorial import matmul as tutorial_matmul

logger = logging.getLogger(__name__)
try:
from .persistent import (
allocate_matmul_tma,
Expand All @@ -30,6 +28,10 @@
HAS_TMA = True
except ModuleNotFoundError:
HAS_TMA = False
logger.warning("Failed to import TMA due to module not being found")
except Exception as e:
HAS_TMA = False
logger.warning(f"Failed to import TMA: {e}")


def parse_args(args):
Expand Down

0 comments on commit 7b67b0a

Please sign in to comment.