@@ -43,7 +43,7 @@ static mxSmlReturn_t (*mxSmlInit)(void);
4343
4444// Static information and helper functions
4545
46- static mxSmlReturn_t ( * mxSmlGetDeviceCount )( unsigned int * deviceCount );
46+ static unsigned int ( * mxSmlGetDeviceCount )( void );
4747
4848static const char * (* mxSmlGetErrorString )(mxSmlReturn_t );
4949
@@ -223,7 +223,6 @@ __attribute__((constructor)) static void init_extract_gpuinfo_metax(void) { regi
223223 *
224224 */
225225static bool gpuinfo_metax_init (void ) {
226- printf ("gpuinfo_metax_init\n" );
227226 libmxsml_handle = dlopen ("/opt/mxdriver/lib/libmxsml.so" , RTLD_LAZY );
228227 if (!libmxsml_handle )
229228 libmxsml_handle = dlopen ("/opt/maca/lib/libmxsml.so" , RTLD_LAZY );
@@ -344,13 +343,10 @@ static const char *gpuinfo_metax_last_error_string(void) {
344343}
345344
346345static bool gpuinfo_metax_get_device_handles (struct list_head * devices , unsigned int * count ) {
347- printf ("gpuinfo_metax_get_device_handles...\n" );
348346 if (!libmxsml_handle )
349347 return false;
350348
351- unsigned int num_devices ;
352- mxSmlGetDeviceCount (& num_devices );
353- printf ("device count: %u\n" , num_devices );
349+ unsigned int num_devices = mxSmlGetDeviceCount ();
354350 struct gpu_info_metax * gpu_infos = calloc (num_devices , sizeof (* gpu_infos ));
355351 if (!gpu_infos ) {
356352 local_error_string = strerror (errno );
@@ -364,7 +360,7 @@ static bool gpuinfo_metax_get_device_handles(struct list_head *devices, unsigned
364360 mxSmlDeviceInfo_t deviceInfo ;
365361 mxSmlReturn_t deviceInfoRet = mxSmlGetDeviceInfo (i , & deviceInfo );
366362 if (deviceInfoRet != MXSML_SUCCESS ) {
367- deviceInfoRet ! = mxSmlGetLimitedDeviceInfo (i , & deviceInfo );
363+ deviceInfoRet = mxSmlGetLimitedDeviceInfo (i , & deviceInfo );
368364 // Limited device
369365 if (deviceInfoRet == MXSML_SUCCESS ) {
370366 gpu_infos [* count ].device = deviceInfo ;
0 commit comments