GetTopologyCommonAncestor method error
lengrongfu opened this issue · comments
Lines 183 to 190 in f3264c8
other, ok := o.(nvmlDevice)
if !ok {
return 0, ERROR_INVALID_ARGUMENT
}
this ok
is false, i don't now why, anybody can help me.
![image](https://private-user-images.githubusercontent.com/15009201/292496651-933ea1cb-01af-4ed6-89d4-ccca6885ae7b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM3Mjk0NzEsIm5iZiI6MTcxMzcyOTE3MSwicGF0aCI6Ii8xNTAwOTIwMS8yOTI0OTY2NTEtOTMzZWExY2ItMDFhZi00ZWQ2LTg5ZDQtY2NjYTY4ODVhZTdiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDIxVDE5NTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlZTYyMmQ3NGI0OWYzZmYyZGU4YzAyNzc4NDllMjNlZTQ5NmQ3MzdiMzQxZjYzZGNlNzMyMDhlZjVjMGRmZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.7q8eNZWVJtsMTjwoELGhke__-Jqv7hIe6xExz03T6v8)
@lengrongfu it may have to do with where you're calling this function from. The o
argument is an gpuallocator.nvlibDevice
which is not an nvmlDevice
. I think this highlights a bug in the way we use this code from go-gpuallocator
and I will have a look at reproducing this locally and addressing it.
@lengrongfu I created #17 and NVIDIA/go-gpuallocator#22 to address this issue. I also added a simple example there where I verified the behaviour that you are seeing and that this is addressed by these changes.
@lengrongfu could you confirm that this issue is resolved with the linked issues merged?
@elezar Thanks for the fix, no problem anymore.