Solved by albanD in post #6 
              
              
                All we’re doing here is doing an abuse of notation. You should say that dl/dyi * dyi/dx = dl/dx_i where the _i signifies that this only considers the contribution from y_i. 
If we write things down: You have a function Y = f(X). 
And we are given for every entry in Y, a gradient wrt a loss dl/dyi. 
…