On Mon, Jan 20, 2020 at 11:00:58AM +0000, Andrew Stubbs wrote: > Indeed, fat binaries would be a good solution. > > Presumably it's possible, but I'm not sure how we'd go about getting the > offload mechanism to launch the backend multiple times? Having got that far, > the libgomp and mkoffload changes to select the right variant would probably > be fairly straight-forward.
I'd say easiest would be to do that in the gcn specific mkoffload. But there needs to be a way for the user to specify that he wants only a particular variant and not all of them (perhaps look for -march= in the offload options?)? Or, for the 8 vs. 16 regs, have -march=generic or whatever that would try to generate something that will work everywhere or on as many chips as possible, e.g. by using mostly fiji, but try to use 16 adjacent regs instead of 8? I admit I don't know anything about the hw, just worried because if we have already 4 variants now when the port is almost new, won't we have 30 later on, which could be prohibitive for the fat binaries? Jakub