Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Each benchmark falls into a single category. While such classification is not ac
adjacent, aligned-types, asta, asyncAllocation, awbarrier, blockAccess, blockexchange, blockScan, collision, concurrentKernels, conversion, dispatch, dp4a, graphExecution, ert, interleave, intrinsics-cast, kernelLaunch, layout, mallocFree, maxFlops, mixbench, nosync, openmp, overlap, pad, pitch, popcount, pointerchase, prefetch, reverse, ring, saxpy-ompt, shuffle, simpleMultiDevice, streamCreateCopyDestroy, streamOrderedAllocation, streamPriority, streamUM, tensorAccessor, threadfence, warpexchange, vote, wmma, wordcount, zerocopy

### Machine learning
accuracy, adam, adamw, addBiasQKV, addBiasResidualLayerNorm, attention, attention-paged, attentionMergeState, attentionMultiHead, attentionMultiHeadKVCache, backprop, bincount, bn, channelShuffle, channelSum, clink, concat, crossEntropy, dense-embedding, dropout, dwconv, dwconv1d, expdist, flip, gd, gelu, ge-spmm, geglu, glu, gmm, gru, gru2, kalman, kmc, kmeans, knn, layernorm, lda, lif, logprob, lr, lrn, mask, matern, maxpool3d, mcpr, meanshift, megablocks, mergeVS, mf-sgd, mlaDecode, mlp, mmcsf, mnist, moe, moe-align, moe-sum, mrc, multinomial, muon, nlll, nonzero, overlay, p4, page-rank, permute, perplexity, pointwise, pool, qkv, qtclustering, remap, relu, resnet-kernels, rmsnorm, rowwiseMoments, rotary, sampling, scel, silu, snicit, softmax, softmax-fused, softmax-online, ssm, stddev, streamcluster, tsne, twell, unfold, vol2col, wedford, winograd, word2vec
accuracy, adam, adamw, addBiasQKV, addBiasResidualLayerNorm, attention, attention-paged, attentionMergeState, attentionMultiHead, attentionMultiHeadKVCache, backprop, bincount, bn, channelShuffle, channelSum, clink, concat, crossEntropy, dense-embedding, dropout, dwconv, dwconv1d, expdist, flip, gd, gelu, ge-spmm, geglu, glu, gmm, gru, gru2, kalman, kmc, kmeans, knn, layernorm, lda, lif, logprob, lr, lrn, mask, matern, maxpool3d, mcpr, meanshift, megablocks, mergeVS, mf-sgd, mlaDecode, mlp, mmcsf, mnist, moe, moe-align, moe-sum, mrc, multinomial, muon, nlll, nonzero, overlay, p4, page-rank, permute, perplexity, pointwise, pool, qkv, qtclustering, remap, relu, resnet-kernels, rmsnorm, rowwiseMoments, rotary, sampling, scel, silu, snicit, softmax, softmax-fused, softmax-online, ssm, stddev, streamcluster, trimul, tsne, twell, unfold, vol2col, wedford, winograd, word2vec

### Math
atan2, axpby, bgmv, blas-dot, blas-fp4gemm, blas-fp8gemm, blas-gemm, blas-gemmBatched, blas-gemmStridedBatched, blas-gemmEx, blas-gemmEx2, blas-groupgemm, blas-mxfp6gemm, blas-mxfp8gemm, braycurtis, complex, cross, determinant, divergence, dp, eigenvalue, f16max, f16sp, f8cast, fresnel, fwt, gaussian, geam, gels, gemv, hadamard, hellinger, hmm, idivide, interval, jaccard, jacobi, jacobian, kurtosis, lanczos, langford, lci, lebesgue, leukocyte, lfib4, log2, lud, ludb, lut-gemm, michalewicz, matrix-rotate, matrixT, minkowski, mr, mrg32k3a, norm2, nqueen, ntt, oziMMU, phmm, pnpoly, quant3MatMul, reverse2D, rfs, romberg, rsc, schur-complement, sddmm-batch, secp256k1, simpleSpmv, slu, spd2s, spgeam, spgemm, spmm, spmv, spnnz, sps2d, spsort, sptrsv, thomas, wyllie, zeropoint
Expand Down Expand Up @@ -1755,6 +1755,9 @@ Early results are shown [here](results/README.md)
### tridiagonal (opencl)
Matrix solvers for large number of small independent tridiagonal linear systems(http://developer.download.nvidia.com/compute/cuda/3_0/sdk/website/OpenCL/website/samples.html)

### trimul (cuda)
Triangle multiplicative update in the AlphaFold Evoformer (https://github.com/NVIDIA/cuEquivariance)

### tsa (cuda)
Trotter-Suzuki approximation (https://bitbucket.org/zzzoom/trottersuzuki/src/master/)

Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ set(HECBENCH_POC_BENCHMARKS
tonemapping
tpacf
tqs
trimul
tsne
tsp
unfold
Expand Down
11 changes: 11 additions & 0 deletions src/trimul-cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# trimul-cuda/CMakeLists.txt

# -fopenmp parallelizes the CPU reference in reference.h
add_hecbench_benchmark(
NAME trimul
MODEL cuda
SOURCES main.cu
COMPILE_OPTIONS -Xcompiler -fopenmp
LINK_LIBRARIES cublas -fopenmp
CATEGORIES ml
)
20 changes: 20 additions & 0 deletions src/trimul-cuda/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The triangle multiplicative update algorithm benchmarked here is derived from
NVIDIA cuEquivariance:
https://github.com/NVIDIA/cuEquivariance
cuequivariance_jax/cuequivariance_jax/triangle/_triangle_multiplicative_update.py
cuequivariance_jax/cuequivariance_jax/triangle/_sigmoid_gated_dual_gemm.py

SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0

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.
67 changes: 67 additions & 0 deletions src/trimul-cuda/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#===============================================================================
# User Options
#===============================================================================

# Compiler can be set below, or via environment variable
CC = nvcc
OPTIMIZE = yes
DEBUG = no
# BF16 WMMA requires Ampere or newer.
ARCH = sm_80
LAUNCHER ?=

#===============================================================================
# Program name & source code list
#===============================================================================

program = main

source = main.cu

obj = $(source:.cu=.o)

#===============================================================================
# Sets Flags
#===============================================================================

# Standard Flags
# The CPU reference is OpenMP-parallel; without -fopenmp it still builds and
# runs, just serially, which is slow at the larger sequence lengths.
CFLAGS := $(EXTRA_CFLAGS) -std=c++17 -Xcompiler -Wall -Xcompiler -fopenmp \
-arch=$(ARCH)

# Linker Flags
LDFLAGS = -lcublas -Xcompiler -fopenmp

# Debug Flags
ifeq ($(DEBUG),yes)
CFLAGS += -g -DDEBUG
LDFLAGS += -g
endif

# Optimization Flags
ifeq ($(OPTIMIZE),yes)
CFLAGS += -O3
endif

#===============================================================================
# Targets to Build
#===============================================================================

$(program): $(obj) Makefile
$(CC) $(CFLAGS) $(obj) -o $@ $(LDFLAGS)

%.o: %.cu reference.h Makefile
$(CC) $(CFLAGS) -c $< -o $@

clean:
rm -rf $(program) $(obj)

# Sequence lengths AlphaFold actually runs at, with the pair-representation
# width of 128: the AF2 training crops (256, 384) and the AF3 ones (384, 640,
# 768). Batch is 1 per device in both.
run: $(program)
$(LAUNCHER) ./$(program) 1 256 128 100
$(LAUNCHER) ./$(program) 1 384 128 100
$(LAUNCHER) ./$(program) 1 640 128 100
$(LAUNCHER) ./$(program) 1 768 128 100
Loading