https://cn.mathworks.com/matlabcentral/answers/294938-cannot-find-lmwgpu
More specifically change the Makefile: Caffe Master Makefile line 519
CXXFLAGS="$$CXXFLAGS $(MATLAB_CXXFLAGS) -I$(MATLAB_DIR)/toolbox/distcomp/gpu/extern/include" CXXLIBS="$$CXXLIBS $(STATIC_LINK_COMMAND) $(LDFLAGS) -lmwgpu" -output $@