The present invention relates to a method and
system for automatically configuring the
CUDA environment and GPU
stress testing. The method includes: constructing a mapping relationship table of the device model, architecture,
cuda version, and cudnn version; inputting account information; connecting to the Linux
server through the SSH protocol according to the configured
operating system account and
password, and then transmitting the
Shell script through the SFTP protocol; obtaining the device model and returning it, and according to the query requirements for the obtained device model, querying the predefined mapping relationship table to determine the architecture,
cuda, and cudnn versions corresponding to the device model, and automatically performing downloading, installation, and
verification to obtain the automatically configured environment variables; allocating memory and initializing the matrix, starting the matrix operation
algorithm, and comprehensively testing the computing power and error correction ability of the GPU. The present invention realizes the automatic downloading of
cuda and the configuration of the cuda environment, and comprehensively tests the GPU.