How can I make code changes only on a specific device?

I know there are some possibilities using pc.platform but they are very limited.

For example, say I want to make changes only on a macbook air with x graphics memory or lower, how can I do that? I cant find any way to access the total graphics memory of the device or other such options.

Cheers