Skip to content

Commit

Permalink
[mthreads] Update base/toolkits: tf32 & fp16: modified readme and del…
Browse files Browse the repository at this point in the history
…ete code license
  • Loading branch information
gliangMT committed Dec 4, 2024
1 parent 52ad4bc commit 093d784
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
6 changes: 3 additions & 3 deletions base/toolkits/computation-FP16/mthreads/S4000/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

* 厂商:MThreads
* 产品名称:S4000
* 产品型号:/
* 产品型号:MTT S4000
* TDP:/

# 所用服务器配置

* 服务器数量:1
* 单服务器内使用卡数:1
* 服务器型号:/
* 操作系统版本:Ubuntu 20.04.4 LTS
* 操作系统内核:Linux 5.4.0-42-generic
* 操作系统版本:Ubuntu 22.04.5 LTS
* 操作系统内核:Linux 5.15.0-105-generic
* CPU:/
* docker版本:24.0.7
* 内存:1TiB
Expand Down
10 changes: 3 additions & 7 deletions base/toolkits/computation-FP16/mthreads/S4000/gemm.mu
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2024 BAAI. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License")

#include <mublas.h>
#include <musa_fp16.h>
#include <musa_runtime.h>
Expand All @@ -25,9 +21,9 @@ struct PrecisionConfig {

void test(const PrecisionConfig& config) {
__half* d_A, * d_B, * d_C;
std::vector<__half> h_A(M * K, __float2half(1.0f));
std::vector<__half> h_B(K * N, __float2half(1.0f));
std::vector<__half> h_C(M * N);
std::vector<__half> h_A(M * K, __float2half(1.0f));
std::vector<__half> h_B(K * N, __float2half(1.0f));
std::vector<__half> h_C(M * N);

musaMalloc(&d_A, M * K * config.bytesPerElement);
musaMalloc(&d_B, K * N * config.bytesPerElement);
Expand Down
7 changes: 3 additions & 4 deletions base/toolkits/computation-TF32/mthreads/S4000/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@

* 厂商:MThreads
* 产品名称:S4000
* 产品型号:/
* 产品型号:MTT S4000
* TDP:/

# 所用服务器配置

* 服务器数量:1
* 单服务器内使用卡数:1
* 服务器型号:/
* 操作系统版本:Ubuntu 20.04.4 LTS
* 操作系统内核:Linux 5.4.0-42-generic
* 操作系统版本:Ubuntu 22.04.5 LTS
* 操作系统内核:Linux 5.15.0-105-generic
* CPU:/
* docker版本:24.0.7
* 内存:1TiB
* 服务器间AI芯片直连规格及带宽:此评测样例无需服务器间通信

# 评测结果

## 核心评测结果
Expand Down
10 changes: 3 additions & 7 deletions base/toolkits/computation-TF32/mthreads/S4000/gemm.mu
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2024 BAAI. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License")

#include <mublas.h>
#include <musa_runtime.h>

Expand All @@ -24,9 +20,9 @@ struct PrecisionConfig {

void test(const PrecisionConfig& config) {
float* d_A, * d_B, * d_C;
std::vector<float> h_A(M * K);
std::vector<float> h_B(K * N);
std::vector<float> h_C(M * N);
std::vector<float> h_A(M * K);
std::vector<float> h_B(K * N);
std::vector<float> h_C(M * N);

musaMalloc(&d_A, M * K * config.bytesPerElement);
musaMalloc(&d_B, K * N * config.bytesPerElement);
Expand Down

0 comments on commit 093d784

Please sign in to comment.