Basically, was it a case of 'the enemy of my enemy', or did Japan have similarly racist opinions?
I do not know if they explicitly knew but they probably at least had an idea. The Japanese did very similar things in Chinese Manchuria. They issued a plethora of "scientific" expiraments on the native Chinese that often resembled what the Nazis did to the Jews. The Japanese would torture and expirament on the local Chinese Sidenote Hitler got some of his methods from the United States Euginics movement of the reform era. Basically, the US tried to reduce "unwanted" citizens by forced sterilization. Hitler did give credit where it was given.