Memtune User Guide
Memtune User Guide
DISCLAIMER
The information contained herein is for informational purposes only and is subject to change without
notice. While every precaution has been taken in the preparation of this document, it may contain
technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or
otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or
warranties with respect to the accuracy or completeness of the contents of this document, and assumes
no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness
for particular purposes, with respect to the operation or use of AMD hardware, software or other
products described herein. No license, including implied or arising by estoppel, to any intellectual
property rights is granted by this document. Terms and limitations applicable to the purchase or use of
AMD’s products are as set forth in a signed agreement between the parties or in AMD's Standard Terms
and Conditions of Sale.
AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.
Linux is a registered trademark of Linus Torvalds. Ubuntu and the Ubuntu logo are registered trademarks
of Canonical Ltd. Reverse engineering or disassembly is prohibited. Other product names used in this
publication are for identification purposes only and may be trademarks of their respective companies.
Revision History
Date Revision Changes
June 2020 1.00 Initial version of the
document
Table of Contents
1. Overview ............................................................................................................................... 5
1.1 Supported OS ............................................................................................................... 5
1.2 Hardware Required ..................................................................................................... 5
2. Setup ..................................................................................................................................... 6
2.1 Download ....................................................................................................... 6
2.2 Installation ..................................................................................................... 6
3. Commands supported ...................................................................................................... 7
3.1 “i” ..................................................................................................................................... 7
3.2 “mc” ................................................................................................................................ 7
3.3 Margin test commands .............................................................................................. 7
3.3.1 “marginscript”............................................................................................... 7
3.3.2 “marginscript_strobe” .................................................................................. 8
3.3.4 “margintest_strobe” ..................................................................................... 9
3.4 “trainingcheck” ............................................................................................................ 9
1. Overview
• Memtune is a command line utility with features to determine the memory margin for
GPUs with GDDR6 memory. It also provides options to check various memory
parameters and memory training errors.
1.1 Supported OS
• Linux (Ubuntu 12.04/14.04/16.04/18.04)
2. Setup
2.1 Download
• GPU
o Go to http://gpudiagnostics.amd.com/release/
o Click on Diagnostic Tools tab
o Select Memtune in the list of Diagnostic Tools on the left
o Select the Linux - 64-bit OS version, and download the latest Memtune version.
2.2 Installation
• Linux
o Download the linux package in tar.gz format
o Unzip the tar.gz file to any folder.
o Launch the tool with root privileges by running “./memtune”
o Latest version of AGT and diag suite are required to run the margin tests.
3. Commands supported
3.1 “i”
• This command displays the version number and a list of all present AMD graphics
Devices
• Use “-i=#”, where # is the instance number listed above, to specify the GPU device on
which the commands needs to be run.
3.2 “mc”
• This command displays various memory settings and, GPU and DRAM vref values per
channel as shown below.
3.3.1 “marginscript”
• This is a helper command which generates the ‘margintest.sh’ (also generates other diag
test and config files to be used in this script) to run the training mode margin test.
3.3.2 “marginscript_strobe”
• This helper command generates the ‘margintest_strobe.sh’ (also generates the diag test
and config files to be used in the script), to run the strobe mode margin test.
3.3.3 “margintest”
• This command runs the training mode margin test. This requires an additional parameter
‘-testfile=test_file’ to specify the diag test file to be run at each margin point. Or user can
run the ‘margintest.sh’ script directly.
• The purpose of this command is to check if there is enough margin depending on the
voltage, process and temperature variance.
• Training mode margin is checked for below parameters on GPUs with GDDR6 memory
o GPU Vref
o DRAM Vref
o RxPhase Offset
o TxPhase Offset
• After the test, overall margin test result for each margin point will be displayed on the
console, also the results will be logged in MarginResult.csv per channel.
3.3.4 “margintest_strobe”
• This command runs the training mode margin test. This requires an additional parameter
‘-testfile=test_file’ to specify the diag test file to be run at each margin point. Or user can
run the ‘margintest_strobe.sh’ script directly.
• Strobe mode margin is checked for below parameters on GPUs with GDDR6 memory
o Read Delay (RDQ and RDQS Delay)
o Write Delay (WCK and DQ tx phase)
• After the test, overall margin test result for each margin point will be displayed on the
console, also the results will be logged in MarginResult.csv per channel.
3.4 “trainingcheck”
➢ This command helps to detect if there is a memory training failure on any channel during
GPU bootup.