  The observed large elliptic flow ($v_2$) of direct photons in relativistic
heavy ion collisions challenges us to explain. In this paper we consider only
two sources of direct photons, prompt photons and thermal photons. Prompt
photons are calculated with QCD to next leading order, which fits well the
spectra at high transverse momentum ($p_{\rm t}$) region. Thermal photons are
calculated with AMY rate in a 3+1D viscous hydrodynamical evolution of the
collision systems. Two types of initial conditions, EPOS3 and IP-Glasma, are
employed. Our results with IP-Glasma initial condition agree with results in
published work in most cases, and the difference tells the regions effected by
the absence of viscous correction in photon emission rate. Because both models
are well constrained with hadron data, the hydrodynamic evolution of collision
systems in the two models have many common. However, the transverse velocity of
the collective motion are quite different. This makes a big difference in the
anisotropic emission of direct photon emission. The observed large elliptic
flow of direct photons is reproduced with EPOS3 hydrodynamic evolution.
