It depends on the exact laptop. The A12 is an APU, meaning its an integrated graphics system, meaning it shares processes with the CPU. The 940m is a dedicated graphics card, so it is the same regardless of CPU.
But most if not all laptops run either integrated graphics or dedicated graphics, are you sure the AMD laptop in question does not have a dedicated card?
Seeing as how integrated graphics are not generally as good as dedicated graphics processors I'm going to say the Nvidia card is better.
"are you sure the AMD laptop in question does not have a dedicated card?"
A few do, a few don't. I suppose I'm just trying in general to figure this out. If we assume an i5 with 6gb of ram and a geforce 940m vs an a12 with 6gb ram, the question is more whether there is a tradeoff being made in regards to graphics processing vs standard cpu processing.
I assume as well that dedicated is generally better, but I can't seem to find a good benchmark comparison to go by
I'm not sure that AMD does this, but for Intel graphics, the VRAM is half of the RAM so assuming AMD does similarly, and I am not sure it does, it would have half the RAM tied up for graphics. It also is using CPU cores instead of CUDA cores like the 940 does. The amount of VRAM makes a slight difference but it's not everything.
Honestly If you have the option to go with a dedicated graphics card do it. You can take Intel HD 630, which is the Kaby Lake integrated graphics, and compare it with the 1050, a budget $100 card, and the 1050 beats it by over 250%. Even the 940m beats the brand new 2017 top of the line HD 630 by a few percent, so a mobile year old, x40 card, beats arguably the best integrated graphics in existence, which I cant confirm since I can't find any kind of benchmarks on the a12 so I really can't tell you more about that specifically.
Just that in general, dedicated graphics are better.