Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the testing methods of commonly used frameworks in big data

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what the testing methods of the commonly used framework in big data are, which can be used for reference. Interested friends can refer to them. I hope you will gain a lot after reading this article.

1. Method 1.0:TensorFlow

The test method of TensorFlow1.x is the same as that of TensorFlow2.x. The code is as follows:

Import tensorflow as tfprint (tf.test.is_gpu_available ())

The above code is saved as a .py file and can be run in a test environment. The output: the above is the log information, and the key is the final True, indicating that the test is successful.

2020-09-28 15 tensorflow/stream_executor/platform/default/dso_loader.cc:44 43 AVX22020 03.197710: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX22020-09-28 1514 43 tensorflow/core/platform/cpu_feature_guard.cc:142 03.204525: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll2020-09-28 15 tensorflow/core/platform/cpu_feature_guard.cc:142 43 Soviet 03.232432: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: Name: GeForce RTX 2070 with Max-Q Design major: 7 minor: 5 memoryClockRate (GHz): 1.125pciBusID: 0000 Successfully opened dynamic library cublas64_100.dll2020 01with Max-Q Design major 00.02020-09-28 151543 Successfully opened dynamic library cublas64_100.dll2020 03.235352: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll2020-09-28 1515142823: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] 03.242823: I 0000: 03.261932: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll2020-09-28 15 tensorflow/stream_executor/platform/default/dso_loader.cc:44 43 tensorflow/stream_executor/platform/default/dso_loader.cc:44 03.268757: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll2020-09-28 15 14 48: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll2020-09-28 15:43: 03.315410: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll2020-09-28 15 Successfully opened dynamic library cudnn64_7.dll2020 43 tensorflow/stream_executor/platform/default/dso_loader.cc:44: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll2020-09-28 1514 43 tensorflow/stream_executor/platform/default/dso_loader.cc:44 03.332846: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 02020-09-28 15 purge 43 purl 05.198465 : I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:2020-09-28 15 edge matrix:2020 43 edge matrix:2020 05.200423: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 02020-09-28 1515 14 43 edge matrix:2020 05.201540: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N2020-09-28 15 tensorflow/core/common_runtime/gpu/gpu_device.cc:1178 43 Swiss 05.203863: I tensorflow/core/common_runtime / gpu/gpu_device.cc:1304] Created TensorFlow device (/ device:GPU:0 with 6306 MB memory)-> physical GPU (device: 0 Name: GeForce RTX 2070 with Max-Q Design, pci bus id: 0000VO1with Max-Q Design 00.0, compute capability: 7.5) True

The above is the log information, the key is the last True, indicating that the test was successful. In fact, we can also find a lot of GPU information.

GPU model: name: GeForce RTX 2070 with Max-Q Design

Cuda version: Successfully opened dynamic library cudart64_100.dll

Cudnn version: Successfully opened dynamic library cudnn64_7.dll (7.x)

Number of GPU: Adding visible gpu devices: 0 (1)

GPU video memory: / device:GPU:0 with 6306 MB memory (8G)

1.1:PyTorch

PyTorch and TensorFlow test methods are similar, both have GPU test interface. The GPU test code for PyTorch is as follows:

Import torchprint (torch.cuda.is_available ())

The above code is saved as a .py file and can be run in a test environment. The output: True indicates that the test is successful.

True

You can see that the PyTorch output information is much simpler. In fact, the log information output of TensorFlow can also be controlled.

1.2:MXNet

The MXNet test method is different from the PyTorch,TensorFlow test method, because MXNet' does not have a GPU test interface (or the author has not found it). So the GPU test code of MXNet is tested using the method of catching exceptions by try-catch. The code is as follows:

Import mxnet as mxmxgpu_ok = Falsetry: _ = mx.nd.array (1gpu (0)) mxgpu_ok = Trueexcept: mxgpu_ok = Falseprint (mxgpu_ok)

The above code is saved as a .py file and can be run in a test environment. The output: True indicates that the test is successful.

1.3:PaddlePaddle

PaddlePaddle and TensorFlow test methods are similar, both have GPU test interface. The GPU test code for PyTorch is as follows:

Import paddlepaddle.fluid.install_check.run_check ()

The above code is saved as a .py file and can be run in a test environment. The output: Your Paddle Fluid works well on MUTIPLE GPU or CPU., indicates that the test is successful.

Running Verify Fluid Program... W0928 16:23:17.825171 10572 device_context.cc:252] Please NOTE: device: 0, CUDA Capability: 75, Driver API Version: 11.0, Runtime API Version: 10.0W0928 16:23:17.836141 10572 device_context.cc:260] device: 0, cuDNN Version: 7.6.Your Paddle Fluid works well on SINGLE GPU or CPU.W0928 16:23:19.349067 10572 build_strategy.cc:170] fusion_group is not enabled for Windows/MacOS now And only effective when running with CUDA GPU.Your Paddle Fluid works well on MUTIPLE GPU or CPU.Your Paddle Fluid is installed successfully! Let's start deep Learning with Paddle Fluid now thank you for reading this article carefully. I hope the article "what are the testing methods of commonly used frameworks in big data" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report