{"id":18945,"date":"2024-01-15T15:08:28","date_gmt":"2024-01-15T08:08:28","guid":{"rendered":"https:\/\/www.thegioimaychu.vn\/blog\/?p=18945"},"modified":"2024-01-15T15:08:28","modified_gmt":"2024-01-15T08:08:28","slug":"dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi","status":"publish","type":"post","link":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/","title":{"rendered":"\u0110\u1ecbnh ngh\u0129a Floating Point Precision &#8211; FP64, FP32, FP16 l\u00e0 g\u00ec?"},"content":{"rendered":"<style>.iblink{color:#975!important;}.iblink:hover{color:orange!important;}<\/style><h2>FP ho\u1eb7c Floating Point Precision l\u00e0 g\u00ec?<\/h2>\n<p>Floating Point Precision (\u0110\u1ed9 ch\u00ednh x\u00e1c d\u1ea5u ph\u1ea9y \u0111\u1ed9ng) l\u00e0 bi\u1ec3u di\u1ec5n c\u1ee7a m\u1ed9t s\u1ed1 th\u00f4ng qua h\u1ec7 nh\u1ecb ph\u00e2n.\u00a0\u0110\u1ec3 truy\u1ec1n c\u00e1c s\u1ed1 \u0111\u1ebfn m\u00e1y t\u00ednh c\u1ee7a ch\u00fang ta, c\u00e1c gi\u00e1 tr\u1ecb ph\u1ea3i \u0111\u01b0\u1ee3c d\u1ecbch sang c\u00e1c s\u1ed1 nh\u1ecb ph\u00e2n 1 v\u00e0 0, trong \u0111\u00f3 th\u1ee9 t\u1ef1 v\u00e0 chu\u1ed7i c\u00e1c ch\u1eef s\u1ed1 r\u1ea5t quan tr\u1ecdng.\u00a0C\u00e1c \u0111\u1ecbnh d\u1ea1ng FP ph\u1ed5 bi\u1ebfn nh\u1ea5t l\u00e0 \u0110\u1ed9 ch\u00ednh x\u00e1c m\u1ed9t n\u1eeda (FP16), \u0110\u1ed9 ch\u00ednh x\u00e1c \u0111\u01a1n (FP32) v\u00e0 \u0110\u1ed9 ch\u00ednh x\u00e1c k\u00e9p (FP64), m\u1ed7i \u0111\u1ecbnh d\u1ea1ng \u0111\u1ec1u c\u00f3 \u01b0u \u0111i\u1ec3m, nh\u01b0\u1ee3c \u0111i\u1ec3m v\u00e0 t\u00ednh h\u1eefu d\u1ee5ng ri\u00eang trong c\u00e1c \u1ee9ng d\u1ee5ng c\u1ee5 th\u1ec3.<\/p>\n<p>FPP \u0111\u01b0\u1ee3c c\u1ea5u tr\u00fac theo c\u00e1ch c\u00f3 th\u1ec3 x\u00e1c \u0111\u1ecbnh m\u1ed9t ph\u1ea1m vi gi\u00e1 tr\u1ecb r\u1ed9ng.\u00a0Ch\u1eef s\u1ed1 nh\u1ecb ph\u00e2n \u0111\u1ea7u ti\u00ean bi\u1ec3u th\u1ecb d\u1ea5u (sign) cho s\u1ed1 \u0111\u00f3 l\u00e0 d\u01b0\u01a1ng ho\u1eb7c \u00e2m.\u00a0T\u1eadp h\u1ee3p c\u00e1c ch\u1eef s\u1ed1 nh\u1ecb ph\u00e2n ti\u1ebfp theo l\u00e0 s\u1ed1 m\u0169 (exponent) c\u00f3 c\u01a1 s\u1ed1 2 bi\u1ec3u th\u1ecb gi\u00e1 tr\u1ecb nguy\u00ean c\u1ee7a s\u1ed1 \u0111\u00f3.\u00a0T\u1eadp h\u1ee3p c\u00e1c ch\u1eef s\u1ed1 nh\u1ecb ph\u00e2n cu\u1ed1i c\u00f9ng bi\u1ec3u th\u1ecb ph\u1ea7n \u0111\u1ecbnh tr\u1ecb (significand hay mantissa) \u0111\u1ea1i di\u1ec7n cho gi\u00e1 tr\u1ecb \u0111\u1eb1ng sau d\u1ea5u th\u1eadp ph\u00e2n.\u00a0M\u1ed9t s\u1ed1 th\u1eadm ch\u00ed c\u00f2n g\u1ecdi \u0111\u00e2y l\u00e0 ph\u00e2n s\u1ed1 (fraction).<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/tgmc-blog-65a49cfd5c31f.jpg\" alt=\"\" \/><\/p>\n<p>Vi\u1ec7c bi\u1ec3u di\u1ec5n s\u1ed1 b\u1eb1ng chu\u1ed7i ph\u00e2n s\u1ed1 d\u00e0i c\u00f3 th\u1ec3 kh\u00f3 kh\u0103n khi s\u1eed d\u1ee5ng c\u00e1c ph\u00e9p to\u00e1n nh\u01b0 s\u1ed1 m\u0169 v\u00e0 s\u1ed1 nh\u1ecb ph\u00e2n.\u00a0V\u00ec v\u1eady, s\u1ebd c\u00f3 m\u1ed9t s\u1ed1 sai s\u00f3t do l\u1ed7i l\u00e0m tr\u00f2n s\u1ed1.\u00a0V\u00ed d\u1ee5, trong FP32, bi\u1ec3u th\u1ecb m\u1ed9t s\u1ed1 v\u1edbi \u0111\u1ed9 ch\u00ednh x\u00e1c trong kho\u1ea3ng +\/- 0.5, gi\u00e1 tr\u1ecb t\u1ed1i \u0111a \u0111\u01b0\u1ee3c bi\u1ec3u th\u1ecb b\u1eb1ng FP32 ph\u1ea3i nh\u1ecf h\u01a1n 2^23.<\/p>\n<p>B\u1ea5t k\u1ef3 gi\u00e1 tr\u1ecb n\u00e0o l\u1edbn h\u01a1n v\u00e0 kho\u1ea3ng c\u00e1ch gi\u1eefa c\u00e1c gi\u00e1 tr\u1ecb \u0111\u01b0\u1ee3c bi\u1ec3u th\u1ecb b\u1eb1ng FP32 s\u1ebd l\u1edbn h\u01a1n 0.5.\u00a0Ng\u01b0\u1ee3c l\u1ea1i, bi\u1ec3u th\u1ecb m\u1ed9t s\u1ed1 c\u00f3 \u0111\u1ed9 ch\u00ednh x\u00e1c trong kho\u1ea3ng +\/- 0.5, gi\u00e1 tr\u1ecb t\u1ed1i \u0111a \u0111\u01b0\u1ee3c bi\u1ec3u th\u1ecb b\u1eb1ng FP64 c\u00f3 th\u1ec3 l\u1edbn t\u1edbi 2^52.\u00a0B\u1ea5t k\u1ef3 gi\u00e1 tr\u1ecb n\u00e0o l\u1edbn h\u01a1n v\u00e0 kho\u1ea3ng c\u00e1ch gi\u1eefa c\u00e1c gi\u00e1 tr\u1ecb \u0111\u01b0\u1ee3c bi\u1ec3u th\u1ecb b\u1eb1ng FP64 s\u1ebd l\u1edbn h\u01a1n 0.5.\u00a0C\u00e0ng ch\u00ednh x\u00e1c th\u00ec ph\u1ea1m vi c\u00e0ng nh\u1ecf.\u00a0Nh\u1eefng \u0111i\u1ec3m kh\u00f4ng ch\u00ednh x\u00e1c n\u00e0y c\u00f3 th\u1ec3 g\u00e2y ra l\u1ed7i trong c\u00e1c \u1ee9ng d\u1ee5ng c\u1ea7n ph\u1ea3i \u0111\u1ed9 ch\u00ednh x\u00e1c cao.<\/p>\n<h2>S\u1ef1 kh\u00e1c bi\u1ec7t gi\u1eefa FP64, FP32 v\u00e0 FP16<\/h2>\n<p>FP64, FP32 v\u00e0 FP16 l\u00e0 c\u00e1c lo\u1ea1i FPP ph\u1ed5 bi\u1ebfn h\u01a1n.\u00a0FP32 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng r\u1ed9ng r\u00e3i nh\u1ea5t v\u00ec \u0111\u1ed9 ch\u00ednh x\u00e1c t\u1ed1t v\u00e0 k\u00edch th\u01b0\u1edbc \u0111\u01b0\u1ee3c gi\u1ea3m.\u00a0S\u1ed1 d\u1ea5u ph\u1ea9y \u0111\u1ed9ng c\u00e0ng l\u1edbn th\u00ec th\u1eddi gian ch\u1ea1y c\u00e1c gi\u00e1 tr\u1ecb r\u1ea5t c\u1ee5 th\u1ec3 \u0111\u00f3 th\u00f4ng qua c\u00e1c ph\u00e9p t\u00ednh c\u00e0ng l\u00e2u.\u00a0M\u1ed9t s\u1ed1 workload kh\u00f4ng \u0111\u01b0\u1ee3c h\u01b0\u1edfng l\u1ee3i t\u1eeb \u0111\u1ed9 ch\u00ednh x\u00e1c cao h\u01a1n, trong khi m\u1ed9t s\u1ed1 kh\u00e1c ch\u1ec9 kh\u1ea3 thi khi s\u1eed d\u1ee5ng c\u00e1c \u0111\u1ecbnh d\u1ea1ng c\u00f3 \u0111\u1ed9 ch\u00ednh x\u00e1c th\u1ea5p h\u01a1n.\u00a0Ch\u00fang ta h\u00e3y xem x\u00e9t ki\u1ebfn \u200b\u200btr\u00fac c\u1ee7a t\u1eebng \u0111\u1ecbnh d\u1ea1ng FPP, m\u00f4 t\u1ea3 \u01b0u v\u00e0 nh\u01b0\u1ee3c \u0111i\u1ec3m c\u1ee7a ch\u00fang, c\u0169ng nh\u01b0 li\u1ec7t k\u00ea m\u1ed9t s\u1ed1 \u1ee9ng d\u1ee5ng m\u00e0 c\u00e1c \u0111\u1ecbnh d\u1ea1ng n\u00e0y ph\u00f9 h\u1ee3p nh\u1ea5t.<\/p>\n<h3>FP64 l\u00e0 g\u00ec?<\/h3>\n<p>FP64 hay Double Precision 64-bit s\u1eed d\u1ee5ng 64 bit nh\u1ecb ph\u00e2n \u0111\u1ec3 bi\u1ec3u th\u1ecb c\u00e1c s\u1ed1 trong c\u00e1c ph\u00e9p t\u00ednh \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n tr\u00ean h\u1ec7 th\u1ed1ng c\u1ee7a b\u1ea1n.\u00a0\u0110\u1ecbnh d\u1ea1ng n\u00e0y cung c\u1ea5p \u0111\u1ed9 ch\u00ednh x\u00e1c cao nh\u1ea5t trong s\u1ed1 c\u00e1c t\u00f9y ch\u1ecdn ph\u1ed5 bi\u1ebfn, khi\u1ebfn n\u00f3 tr\u1edf n\u00ean l\u00fd t\u01b0\u1edfng cho c\u00e1c \u1ee9ng d\u1ee5ng y\u00eau c\u1ea7u \u0111\u1ed9 ch\u00ednh x\u00e1c cao.<\/p>\n<p><strong>FP64 Double Precision s\u1eed d\u1ee5ng:<\/strong><\/p>\n<ul>\n<li>1 bit cho d\u1ea5u d\u01b0\u01a1ng\/\u00e2m.<\/li>\n<li>11 bit \u0111\u1ec3 bi\u1ec3u di\u1ec5n s\u1ed1 m\u0169 v\u1edbi c\u01a1 s\u1ed1 2.<\/li>\n<li>52 bit cho fraction\/significand\/mantissa, t\u1ee9c l\u00e0 gi\u00e1 tr\u1ecb sau d\u1ea5u th\u1eadp ph\u00e2n.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/tgmc-blog-65a49cfe4bdd5.jpg\" alt=\"\" \/><\/p>\n<p>\u0110\u1ed9 ch\u00ednh x\u00e1c c\u1ee7a FP64 hi\u1ebfm khi \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng trong c\u00e1c workload <a class=\"iblink\" href=\"\/blog\/tag\/deep-learning\/\">Deep Learning<\/a> v\u00e0 AI v\u00ec ph\u00e9p nh\u00e2n ma tr\u1eadn li\u00ean t\u1ee5c \u0111\u1ec3 c\u1eadp nh\u1eadt c\u00e1c tr\u1ecdng s\u1ed1 c\u00f3 th\u1ec3 l\u00e0m t\u0103ng \u0111\u00e1ng k\u1ec3 th\u1eddi gian \u0111\u00e0o t\u1ea1o.\u00a0FP64 ch\u1ee7 y\u1ebfu \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng cho \u0111i\u1ec7n to\u00e1n khoa h\u1ecdc v\u1edbi c\u00e1c y\u00eau c\u1ea7u ch\u00ednh x\u00e1c cao nh\u01b0 thi\u1ebft k\u1ebf s\u1ea3n ph\u1ea9m s\u1ea3n xu\u1ea5t, m\u00f4 ph\u1ecfng c\u01a1 h\u1ecdc v\u00e0 \u0111\u1ed9ng l\u1ef1c h\u1ecdc ch\u1ea5t l\u1ecfng c\u00f3 trong c\u00e1c \u1ee9ng d\u1ee5ng Ansys.<\/p>\n<p>Ch\u1ec9 m\u1ed9t s\u1ed1 \u00edt GPU c\u00f3 th\u1ec3 t\u00ednh to\u00e1n \u0111\u1ea7y \u0111\u1ee7 b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng FP64 nguy\u00ean b\u1ea3n nh\u01b0 NVIDIA GV100 (\u0111\u00e3 ng\u1eebng s\u1ea3n xu\u1ea5t), NVIDIA A100, NVIDIA H100 v\u00e0 NVIDIA A800, c\u00f9ng v\u1edbi c\u00e1c GPU NVIDIA kh\u00e1c c\u00f3 hi\u1ec7u su\u1ea5t FP64 b\u1ecb h\u1ea1n ch\u1ebf.\u00a0C\u00e1c b\u1ed9 t\u0103ng t\u1ed1c GPU kh\u00e1c v\u1ed1n h\u1ed7 tr\u1ee3 FP64 bao g\u1ed3m d\u00f2ng AMD Instinct nh\u01b0 MI300A v\u00e0 MI300X.<\/p>\n<h3>FP32 l\u00e0 g\u00ec?<\/h3>\n<p>FP32 hay Single Precision 32-bit s\u1eed d\u1ee5ng 32 bit nh\u1ecb ph\u00e2n \u0111\u1ec3 bi\u1ec3u di\u1ec5n s\u1ed1.\u00a0\u0110\u1ecbnh d\u1ea1ng n\u00e0y l\u00e0 \u0111\u1ecbnh d\u1ea1ng FPP \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng r\u1ed9ng r\u00e3i nh\u1ea5t, \u0111\u00e1nh \u0111\u1ed5i m\u1ed9t s\u1ed1 \u0111\u1ed9 ch\u00ednh x\u00e1c m\u1ed9t c\u00e1ch th\u1ecfa \u0111\u00e1ng \u0111\u1ec3 c\u00f3 gi\u00e1 tr\u1ecb tr\u1ecdng s\u1ed1 nh\u1eb9 h\u01a1n \u0111\u01b0\u1ee3c bi\u1ec3u th\u1ecb b\u1eb1ng \u00edt ch\u1eef s\u1ed1 h\u01a1n.\u00a0\u00cdt ch\u1eef s\u1ed1 h\u01a1n chi\u1ebfm \u00edt b\u1ed9 nh\u1edb h\u01a1n, t\u1eeb \u0111\u00f3 t\u0103ng t\u1ed1c \u0111\u1ed9.<\/p>\n<p><strong>FP32 Single Precision s\u1eed d\u1ee5ng:<\/strong><\/p>\n<ul>\n<li>1 bit cho d\u1ea5u d\u01b0\u01a1ng\/\u00e2m<\/li>\n<li>8 bit \u0111\u1ec3 bi\u1ec3u di\u1ec5n s\u1ed1 m\u0169 v\u1edbi c\u01a1 s\u1ed1 2.<\/li>\n<li>23 bit cho fraction\/significand\/mantissa, t\u1ee9c l\u00e0 gi\u00e1 tr\u1ecb sau d\u1ea5u th\u1eadp ph\u00e2n.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/tgmc-blog-65a49cff000b9.jpg\" alt=\"\" \/><\/p>\n<p>FP32 l\u00e0 m\u1eb7c \u0111\u1ecbnh cho t\u1ea5t c\u1ea3 c\u00e1c \u1ee9ng d\u1ee5ng kh\u00f4ng c\u1ea7n \u0111\u1ed9 ch\u00ednh x\u00e1c cao c\u0169ng nh\u01b0 kh\u00f4ng c\u1ea7n t\u1ed1c \u0111\u1ed9 c\u1ef1c nhanh.\u00a0FP32 ch\u00ednh x\u00e1c \u0111\u1ebfn m\u1ee9c b\u1ea1n c\u00f3 th\u1ec3 nh\u1eadn \u0111\u01b0\u1ee3c m\u00e0 kh\u00f4ng c\u1ea7n s\u1eed d\u1ee5ng qu\u00e1 m\u1ee9c c\u1ea7n thi\u1ebft.\u00a0N\u00f3 \u0111\u00e3 l\u00e0 ti\u00eau chu\u1ea9n cho t\u00ednh to\u00e1n m\u1ea1ng n\u01a1-ron trong m\u1ed9t th\u1eddi gian kh\u00e1 l\u00e2u v\u00e0 h\u1ea7u h\u1ebft c\u00e1c framework c\u0169ng nh\u01b0 code \u0111\u1ec1u s\u1eed d\u1ee5ng v\u00e0 ch\u1ea1y tr\u00ean FP32 theo m\u1eb7c \u0111\u1ecbnh.\u00a0Tuy nhi\u00ean, \u0111\u1ed1i v\u1edbi nh\u1eefng ng\u01b0\u1eddi ch\u1ea1y c\u00e1c ph\u00e9p t\u00ednh v\u00e0 m\u00f4 ph\u1ecfng khoa h\u1ecdc, s\u1ef1 thi\u1ebfu ch\u00ednh x\u00e1c nh\u1ecf \u0111\u00f3 trong FP32 c\u00f3 th\u1ec3 d\u1eabn \u0111\u1ebfn c\u00e1c ph\u00e9p t\u00ednh kh\u00f4ng ch\u00ednh x\u00e1c do t\u00edch t\u1ee5 nhi\u1ec1u l\u1ed7i l\u00e0m tr\u00f2n nh\u1ecf.<\/p>\n<p>FP32 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng trong t\u1ea5t c\u1ea3 c\u00e1c workload bao g\u1ed3m H\u1ecdc m\u00e1y, k\u1ebft xu\u1ea5t, m\u00f4 ph\u1ecfng ph\u00e2n t\u1eed,&#8230;\u00a0\u0110\u00e2y l\u00e0 \u0111\u1ecbnh d\u1ea1ng FP c\u00e2n b\u1eb1ng nh\u1ea5t trong \u0111\u00f3 t\u1ed1c \u0111\u1ed9 v\u00e0 \u0111\u1ed9 ch\u00ednh x\u00e1c l\u00e0 c\u1ea7n thi\u1ebft.<\/p>\n<h3>FP16 l\u00e0 g\u00ec?<\/h3>\n<p>FP16 hay Half Precision 16-bit ch\u1ec9 s\u1eed d\u1ee5ng 16 bit nh\u1ecb ph\u00e2n.\u00a0\u0110\u1ecbnh d\u1ea1ng n\u00e0y \u0111ang c\u00f3 xu h\u01b0\u1edbng t\u0103ng l\u00ean trong c\u00e1c workload <a class=\"iblink\" href=\"\/blog\/tag\/deep-learning\/\">Deep Learning<\/a> thay v\u00ec FP32 truy\u1ec1n th\u1ed1ng.\u00a0Do tr\u1ecdng s\u1ed1 c\u00f3 \u0111\u1ed9 ch\u00ednh x\u00e1c th\u1ea5p h\u01a1n trong m\u1ea1ng n\u01a1-ron d\u01b0\u1eddng nh\u01b0 kh\u00f4ng quan tr\u1ecdng c\u0169ng nh\u01b0 kh\u00f4ng \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn hi\u1ec7u su\u1ea5t c\u1ee7a m\u00f4 h\u00ecnh n\u00ean \u0111\u1ed9 ch\u00ednh x\u00e1c b\u1ed5 sung c\u1ee7a FP32 c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c \u0111\u00e1nh \u0111\u1ed5i \u0111\u1ec3 l\u1ea5y t\u1ed1c \u0111\u1ed9.<\/p>\n<p><strong>FP16 Half Precision s\u1eed d\u1ee5ng:<\/strong><\/p>\n<ul>\n<li>1 bit cho d\u1ea5u d\u01b0\u01a1ng\/\u00e2m<\/li>\n<li>5 bit \u0111\u1ec3 bi\u1ec3u di\u1ec5n s\u1ed1 m\u0169 v\u1edbi c\u01a1 s\u1ed1 2.<\/li>\n<li>10 bit cho fraction\/significand\/mantissa, t\u1ee9c l\u00e0 gi\u00e1 tr\u1ecb sau d\u1ea5u th\u1eadp ph\u00e2n.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/tgmc-blog-65a49d032661e.jpg\" alt=\"\" \/><\/p>\n<p>FP16 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng ch\u1ee7 y\u1ebfu \u0111\u1ec3 \u0111\u00e0o t\u1ea1o m\u00f4 h\u00ecnh H\u1ecdc s\u00e2u v\u00e0 suy lu\u1eadn \u0111\u1ec3 t\u00ednh to\u00e1n nhanh, th\u1ef1c hi\u1ec7n nhi\u1ec1u ph\u00e9p t\u00ednh h\u01a1n tr\u00ean m\u1ed7i \u0111\u01a1n v\u1ecb th\u1eddi gian.\u00a0C\u00e1c m\u00f4 h\u00ecnh AI ph\u1ed5 bi\u1ebfn c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng \u00edt \u0111\u1ed9 ch\u00ednh x\u00e1c h\u01a1n &#8211; l\u00e0 c\u00e1c m\u00f4 h\u00ecnh 3D \u0111\u01b0\u1ee3c \u0111\u00e0o t\u1ea1o b\u1eb1ng AI trong \u0111\u00f3 c\u00e1c chuy\u1ec3n \u0111\u1ed9ng kh\u00f4ng c\u1ea7n ph\u1ea3i ho\u00e0n h\u1ea3o v\u00e0 cho ph\u00e9p m\u1ed9t s\u1ed1 sai l\u1ec7ch.<\/p>\n<p>Vi\u1ec7c \u0111\u00e0o t\u1ea1o c\u00e1c m\u00f4 h\u00ecnh n\u00e0y c\u00f3 th\u1ec3 gi\u00fap c\u00e1c nh\u00e0 l\u00e0m phim ho\u1ea1t h\u00ecnh y\u00eau c\u1ea7u m\u00f4 h\u00ecnh th\u1ef1c hi\u1ec7n m\u1ed9t h\u00e0nh \u0111\u1ed9ng \u0111\u1ec3 c\u00f3 th\u1ec3 t\u1ea1o ho\u1ea1t \u1ea3nh cho tr\u00f2 ch\u01a1i c\u1ee7a h\u1ecd ho\u1eb7c gi\u00fap robot h\u1ecdc c\u00e1ch \u0111i l\u00ean c\u1ea7u thang ho\u1eb7c nh\u1ea3y kh\u1ecfi b\u1ec7.\u00a0Tuy nhi\u00ean, robot ch\u00ednh x\u00e1c \u0111\u1ec3 l\u1eafp r\u00e1p m\u00e1y m\u00f3c s\u1ebd \u0111\u01b0\u1ee3c h\u01b0\u1edfng l\u1ee3i t\u1eeb vi\u1ec7c s\u1eed d\u1ee5ng \u0111\u00e0o t\u1ea1o b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng c\u00e1c \u0111\u1ecbnh d\u1ea1ng d\u1ea5u ph\u1ea9y \u0111\u1ed9ng c\u00f3 \u0111\u1ed9 ch\u00ednh x\u00e1c cao h\u01a1n.<\/p>\n<h2>M\u1ed9t s\u1ed1 FPP kh\u00e1c m\u00e0 b\u1ea1n c\u00f3 th\u1ec3 \u0111\u00e3 g\u1eb7p<\/h2>\n<p>FP64, FP32 v\u00e0 FP16 l\u00e0 nh\u1eefng \u0111\u1ecbnh d\u1ea1ng ph\u1ed5 bi\u1ebfn nh\u01b0ng c\u0169ng c\u00f3 th\u00eam c\u00e1c \u0111\u1ecbnh d\u1ea1ng FPP kh\u00e1c.<\/p>\n<h3>BF16 l\u00e0 g\u00ec?<\/h3>\n<p>BF16 hay BFloat16 l\u00e0 m\u1ed9t \u0111\u1ecbnh d\u1ea1ng \u0111\u01b0\u1ee3c Google ph\u00e1t tri\u1ec3n v\u1edbi t\u00ean g\u1ecdi \u201cBrain Float Point Format\u201d c\u00f3 ngu\u1ed3n g\u1ed1c t\u1eeb Google Brain, m\u1ed9t nh\u00f3m nghi\u00ean c\u1ee9u AI t\u1ea1i Google.\u00a0T\u1ea1i Google, h\u1ecd nh\u1eadn th\u1ea5y r\u1eb1ng FP16 kh\u00f4ng c\u00f3 \u00fd \u0111\u1ecbnh \u1ee9ng d\u1ee5ng Deep Learning v\u00ec ph\u1ea1m vi ho\u1ea1t \u0111\u1ed9ng c\u1ee7a n\u00f3 qu\u00e1 h\u1ea1n ch\u1ebf.\u00a0Trong khi v\u1eabn s\u1eed d\u1ee5ng 16 bit nh\u1ecb ph\u00e2n, h\u1ecd \u0111\u00e3 \u0111i\u1ec1u ch\u1ec9nh l\u1ea1i c\u00e1c bit \u0111\u01b0\u1ee3c ph\u00e2n b\u1ed5 \u0111\u1ec3 c\u00f3 ph\u1ea1m vi g\u1ea7n gi\u1ed1ng v\u1edbi FP32 h\u01a1n.<\/p>\n<p><strong>BF16 ho\u1eb7c BFloat16 s\u1eed d\u1ee5ng:<\/strong><\/p>\n<ul>\n<li>1 bit cho d\u1ea5u d\u01b0\u01a1ng\/\u00e2m.<\/li>\n<li>8 bit \u0111\u1ec3 bi\u1ec3u di\u1ec5n s\u1ed1 m\u0169 c\u00f3 c\u01a1 s\u1ed1 2.<\/li>\n<li>7 bit cho fraction\/significand\/mantissa, t\u1ee9c l\u00e0 gi\u00e1 tr\u1ecb sau d\u1ea5u th\u1eadp ph\u00e2n.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/tgmc-blog-65a49d03da2a8.jpg\" alt=\"\" \/><\/p>\n<p>B\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng c\u00f9ng s\u1ed1 bit cho s\u1ed1 m\u0169 nh\u01b0 FP32, vi\u1ec7c chuy\u1ec3n \u0111\u1ed5i FP32 th\u00e0nh BF16 nhanh h\u01a1n v\u00e0 \u00edt ph\u1ee9c t\u1ea1p h\u01a1n b\u1eb1ng c\u00e1ch b\u1ecf qua ph\u1ea7n ph\u00e2n s\u1ed1 theo m\u1ed9t s\u1ed1 ch\u1eef s\u1ed1.\u00a0V\u00e0 m\u1eb7c d\u00f9 \u0111\u1ecbnh d\u1ea1ng BF16 \u0111\u01b0\u1ee3c thi\u1ebft k\u1ebf b\u1edfi Google nh\u01b0ng n\u00f3 \u0111ang tr\u1edf th\u00e0nh ti\u00eau chu\u1ea9n \u0111\u1ec3 thay th\u1ebf FP16 khi ch\u1ea1y v\u00e0 \u0111\u00e0o t\u1ea1o c\u00e1c m\u1ea1ng th\u1ea7n kinh s\u00e2u v\u1ed1n s\u1eed d\u1ee5ng FP32.<\/p>\n<p>BF16 c\u0169ng l\u00e0 \u1ee9ng c\u1eed vi\u00ean ho\u00e0n h\u1ea3o cho \u0111\u1ed9 ch\u00ednh x\u00e1c h\u1ed7n h\u1ee3p gi\u1eefa FP32 v\u00e0 BF16.\u00a0V\u00ec BF16 t\u01b0\u01a1ng t\u1ef1 theo c\u1ea5p s\u1ed1 nh\u00e2n v\u1edbi FP32, n\u00ean n\u00f3 ho\u1ea1t \u0111\u1ed9ng nh\u01b0 m\u1ed9t s\u1ef1 thay th\u1ebf t\u00f9y \u00fd v\u1edbi \u0111\u1ed9 ch\u00ednh x\u00e1c ch\u1eef s\u1ed1 th\u1eadp ph\u00e2n \u00edt h\u01a1n trong khi s\u1eed d\u1ee5ng m\u1ed9t n\u1eeda \u0111\u1ed9 d\u00e0i bit.\u00a0B\u1ed9 nh\u1edb c\u1ea7n thi\u1ebft \u0111\u1ec3 l\u01b0u tr\u1eef BF16 th\u1ea5p h\u01a1n c\u00f9ng v\u1edbi kh\u1ea3 n\u0103ng d\u1ecbch d\u1ec5 d\u00e0ng, vi\u1ec7c s\u1eed d\u1ee5ng BF16 c\u00f3 th\u1ec3 t\u0103ng t\u1ed1c \u0111\u1ed9 x\u1eed l\u00fd c\u00e1c workload b\u1eb1ng c\u00e1c t\u00ednh to\u00e1n nguy\u00ean b\u1ea3n c\u1ee7a FP32.<\/p>\n<h3>TF32 l\u00e0 g\u00ec?<\/h3>\n<p>TF32 hay Tensor-Float32 l\u00e0 ch\u1ebf \u0111\u1ed9 to\u00e1n h\u1ecdc do NVIDIA t\u1ea1o ra, bi\u1ec3u th\u1ecb c\u00e1c gi\u00e1 tr\u1ecb t\u1eeb 32 bit \u0111\u1ebfn 19 bit c\u1ee7a FP32.\u00a0T\u01b0\u01a1ng t\u1ef1 nh\u01b0 ch\u1ee9c n\u0103ng c\u1ee7a BF16, TF32 s\u1eed d\u1ee5ng c\u00f9ng 8 bit \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh s\u1ed1 m\u0169 nh\u1eb1m duy tr\u00ec c\u00f9ng m\u1ed9t ph\u1ea1m vi v\u00e0 d\u1ec5 d\u1ecbch khi l\u00e0m vi\u1ec7c v\u1edbi c\u00e1c ph\u00e9p t\u00ednh FP32 trong khi s\u1eed d\u1ee5ng ph\u1ea7n \u0111\u1ecbnh tr\u1ecb\/ph\u00e2n s\u1ed1 10 bit t\u1eeb FP16.\u00a0V\u00ec s\u1eed d\u1ee5ng c\u00f9ng 8 bit nh\u01b0 FP32 n\u00ean TF32 l\u00e0 m\u1ed9t c\u00e1ch kh\u00e1c \u0111\u1ec3 GPU NVIDIA c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c ph\u00e9p t\u00ednh FP32 m\u1ed9t c\u00e1ch d\u1ec5 d\u00e0ng v\u1edbi gi\u00e1 tr\u1ecb ph\u00e2n s\u1ed1 ng\u1eafn h\u01a1n \u0111\u01b0\u1ee3c l\u00e0m tr\u00f2n t\u1eeb 23 bit c\u1ee7a FP32 th\u00e0nh 10 bit c\u1ee7a TF32.<\/p>\n<p><strong>TF32 ho\u1eb7c Tensor-Float32 s\u1eed d\u1ee5ng:<\/strong><\/p>\n<ul>\n<li>1 bit cho d\u1ea5u d\u01b0\u01a1ng\/\u00e2m.<\/li>\n<li>8 bit \u0111\u1ec3 bi\u1ec3u di\u1ec5n s\u1ed1 m\u0169 c\u00f3 c\u01a1 s\u1ed1 2.<\/li>\n<li>10 bit cho fraction\/significand\/mantissa, t\u1ee9c l\u00e0 gi\u00e1 tr\u1ecb sau d\u1ea5u th\u1eadp ph\u00e2n.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignleft\" src=\"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/tgmc-blog-65a49d04b6d27.jpg\" alt=\"\" \/><\/p>\n<p>V\u1ec1 m\u1eb7t k\u1ef9 thu\u1eadt, TF32 l\u00e0 nh\u1ecb ph\u00e2n 19 bit v\u00e0 l\u00e0 FP32 k\u00e9m ch\u00ednh x\u00e1c h\u01a1n trong ph\u1ea7n ph\u00e2n s\u1ed1 c\u1ee7a gi\u00e1 tr\u1ecb \u0111\u01b0\u1ee3c bi\u1ec3u th\u1ecb.\u00a0NVIDIA Ampere v\u00e0 Tensor Core sau n\u00e0y v\u1eadn h\u00e0nh ph\u00e9p nh\u00e2n ma tr\u1eadn b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng \u0111\u1ea7u v\u00e0o FP32 \u0111\u01b0\u1ee3c d\u1ecbch sang TF32 v\u00e0 \u0111\u01b0a ra k\u1ebft qu\u1ea3 nh\u00e2n ma tr\u1eadn tr\u1edf l\u1ea1i trong FP32 \u0111\u1ec3 t\u00ednh to\u00e1n th\u00eam v\u00e0 n\u00f3 ho\u1ea1t \u0111\u1ed9ng nh\u01b0 sau:<\/p>\n<p><em>Khi t\u00ednh to\u00e1n c\u00e1c ph\u00e9p to\u00e1n ma tr\u1eadn, FP32 \u0111\u01b0\u1ee3c chuy\u1ec3n \u0111\u1ed5i th\u00e0nh TF32 b\u1eb1ng c\u00e1ch l\u00e0m tr\u00f2n ph\u1ea7n \u0111\u1ecbnh tr\u1ecb\/ph\u00e2n s\u1ed1 23 bit th\u00e0nh 10 bit ho\u1eb7c v\u1ecb tr\u00ed th\u1eadp ph\u00e2n th\u1ee9 10.\u00a0Ti\u1ebfp theo, c\u00e1c ph\u00e9p t\u00ednh ma tr\u1eadn FP32 \u0111\u01b0\u1ee3c th\u1ef1c thi v\u00e0 sau \u0111\u00f3 gi\u00e1 tr\u1ecb TF32 \u0111\u1ea7u ra \u0111\u01b0\u1ee3c x\u00e1c \u0111\u1ecbnh l\u00e0 gi\u00e1 tr\u1ecb FP32.\u00a0C\u00e1c ph\u00e9p nh\u00e2n kh\u00f4ng ma tr\u1eadn ti\u1ebfp theo s\u1eed d\u1ee5ng FP32.<\/em><\/p>\n<p>\u0110\u1ed9 ch\u00ednh x\u00e1c gi\u1ea3m v\u00e0 \u00edt bit h\u01a1n \u0111\u1ec3 x\u1eed l\u00fd trong c\u00e1c ho\u1ea1t \u0111\u1ed9ng ma tr\u1eadn gi\u00fap gi\u1ea3m b\u0103ng th\u00f4ng b\u1ed9 nh\u1edb c\u1ea7n thi\u1ebft v\u00e0 t\u0103ng t\u1ed1c \u0111\u1ed9 cho c\u00e1c ho\u1ea1t \u0111\u1ed9ng ma tr\u1eadn n\u00e0y c\u00f3 trong Deep Learning v\u00e0 HPC.<\/p>\n<h2>K\u1ebft lu\u1eadn<\/h2>\n<p>T\u00f3m l\u1ea1i, \u0110\u1ed9 ch\u00ednh x\u00e1c d\u1ea5u ph\u1ea9y \u0111\u1ed9ng l\u00e0 m\u1ed9t ch\u1ee7 \u0111\u1ec1 kh\u00f3 m\u00e0 ch\u1ec9 m\u1ed9t s\u1ed1 \u00edt ng\u01b0\u1eddi c\u00f3 th\u1ec3 n\u1eafm b\u1eaft \u0111\u01b0\u1ee3c \u0111\u1ea7y \u0111\u1ee7.\u00a0Tuy nhi\u00ean, \u0111\u1ed1i v\u1edbi nh\u1eefng ng\u01b0\u1eddi \u0111ang thi\u1ebft k\u1ebf m\u1ed9t m\u00f4 h\u00ecnh AI ph\u1ee9c t\u1ea1p, vi\u1ec7c hi\u1ec3u \u0111\u01b0\u1ee3c \u0111\u1ed9 ch\u00ednh x\u00e1c ph\u00f9 h\u1ee3p \u0111\u1ec3 hu\u1ea5n luy\u1ec7n m\u00f4 h\u00ecnh c\u1ee7a b\u1ea1n &#8211; c\u00f3 th\u1ec3 t\u0103ng t\u1ed1c \u0111\u1ed9 v\u00e0 gi\u1ea3m t\u1ed5ng th\u1eddi gian ho\u00e0n th\u00e0nh ho\u1eb7c y\u00eau c\u1ea7u \u0111\u1ed9 ch\u00ednh x\u00e1c t\u1ed1i \u0111a ngay c\u1ea3 khi ph\u1ea3i tr\u1ea3 b\u1eb1ng th\u1eddi gian.<\/p>\n<p>FP64, hay \u0111\u1ed9 ch\u00ednh x\u00e1c k\u00e9p, l\u00e0 ch\u00ednh x\u00e1c nh\u1ea5t nh\u01b0ng c\u00f3 c\u01b0\u1eddng \u0111\u1ed9 t\u00ednh to\u00e1n cao nh\u1ea5t.\u00a0FP32, hay \u0111\u1ed9 ch\u00ednh x\u00e1c \u0111\u01a1n, l\u00e0 ti\u00eau chu\u1ea9n c\u00f3 s\u1ef1 c\u00e2n b\u1eb1ng gi\u1eefa t\u1ed1c \u0111\u1ed9 v\u00e0 \u0111\u1ed9 ch\u00ednh x\u00e1c.\u00a0FP16, hay \u0111\u1ed9 ch\u00ednh x\u00e1c m\u1ed9t n\u1eeda, l\u00e0 \u0111\u1ed9 ch\u00ednh x\u00e1c gi\u1ea3m \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 \u0111\u00e0o t\u1ea1o m\u1ea1ng l\u01b0\u1edbi th\u1ea7n kinh.\u00a0C\u00e1c \u0111\u1ecbnh d\u1ea1ng kh\u00e1c bao g\u1ed3m BF16 v\u00e0 TF32 b\u1ed5 sung cho vi\u1ec7c s\u1eed d\u1ee5ng FP32 \u0111\u1ec3 t\u0103ng t\u1ed1c \u0111\u1ed9 trong c\u00e1c ph\u00e9p t\u00ednh ch\u1ecdn l\u1ecdc.<\/p>\n<p>Theo\u00a0<em>exxactcorp<\/em><\/p>\n<div>____<br \/><b>B\u00e0i vi\u1ebft li\u00ean quan<\/b><\/div>\n<ul><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>FP ho&#7863;c Floating Point Precision l&agrave; g&igrave;? Floating Point Precision (&#272;&#7897; ch&iacute;nh x&aacute;c d&#7845;u ph&#7849;y &#273;&#7897;ng) l&agrave; bi&#7875;u di&#7877;n c&#7911;a m&#7897;t s&#7889; th&ocirc;ng qua h&#7879; nh&#7883; ph&acirc;n.&nbsp;&#272;&#7875; truy&#7873;n c&aacute;c s&#7889; &#273;&#7871;n m&aacute;y t&iacute;nh c&#7911;a ch&uacute;ng ta, c&aacute;c gi&aacute; tr&#7883; ph&#7843;i &#273;&#432;&#7907;c d&#7883;ch sang c&aacute;c s&#7889; nh&#7883; ph&acirc;n 1 v&agrave; 0, trong &#273;&oacute; th&#7913; t&#7921; v&agrave;&#8230;<\/p>\n","protected":false},"author":29,"featured_media":18954,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[3,1],"tags":[1232,1231,1230,1229],"class_list":["post-18945","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-hpc","category-tong-hop","tag-floating-point-precision","tag-fp16","tag-fp32","tag-fp64"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0110\u1ecbnh ngh\u0129a Floating Point Precision - FP64, FP32, FP16 l\u00e0 g\u00ec? - Blog | TheGioiMayChu<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"\u0110\u1ecbnh ngh\u0129a Floating Point Precision - FP64, FP32, FP16 l\u00e0 g\u00ec? - Blog | TheGioiMayChu\" \/>\n<meta name=\"twitter:description\" content=\"FP ho&#7863;c Floating Point Precision l&agrave; g&igrave;? Floating Point Precision (&#272;&#7897; ch&iacute;nh x&aacute;c d&#7845;u ph&#7849;y &#273;&#7897;ng) l&agrave; bi&#7875;u di&#7877;n c&#7911;a m&#7897;t s&#7889; th&ocirc;ng qua h&#7879; nh&#7883; ph&acirc;n.&nbsp;&#272;&#7875; truy&#7873;n c&aacute;c s&#7889; &#273;&#7871;n m&aacute;y t&iacute;nh c&#7911;a ch&uacute;ng ta, c&aacute;c gi&aacute; tr&#7883; ph&#7843;i &#273;&#432;&#7907;c d&#7883;ch sang c&aacute;c s&#7889; nh&#7883; ph&acirc;n 1 v&agrave; 0, trong &#273;&oacute; th&#7913; t&#7921; v&agrave;...\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/TheGioiMayChu-Blog-Image-FPP.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TGMC Blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/\"},\"author\":{\"name\":\"TGMC Blog\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#\\\/schema\\\/person\\\/777f41403962330933a4fbcc80bec570\"},\"headline\":\"\u0110\u1ecbnh ngh\u0129a Floating Point Precision &#8211; FP64, FP32, FP16 l\u00e0 g\u00ec?\",\"datePublished\":\"2024-01-15T08:08:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/\"},\"wordCount\":3000,\"publisher\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TheGioiMayChu-Blog-Image-FPP.jpg\",\"keywords\":[\"floating point precision\",\"fp16\",\"fp32\",\"fp64\"],\"articleSection\":[\"AI - HPC\",\"T\u1ed5ng h\u1ee3p\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/\",\"url\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/\",\"name\":\"\u0110\u1ecbnh ngh\u0129a Floating Point Precision - FP64, FP32, FP16 l\u00e0 g\u00ec? - Blog | TheGioiMayChu\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TheGioiMayChu-Blog-Image-FPP.jpg\",\"datePublished\":\"2024-01-15T08:08:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TheGioiMayChu-Blog-Image-FPP.jpg\",\"contentUrl\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TheGioiMayChu-Blog-Image-FPP.jpg\",\"width\":756,\"height\":395},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/ai-hpc\\\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trang ch\u1ee7\",\"item\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI - HPC\",\"item\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/.\\\/ai-hpc\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u0110\u1ecbnh ngh\u0129a Floating Point Precision &#8211; FP64, FP32, FP16 l\u00e0 g\u00ec?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/\",\"name\":\"Blog | TheGioiMayChu\",\"description\":\"C\u1eadp nh\u1eadt xu h\u01b0\u1edbng c\u00f4ng ngh\u1ec7 m\u00e1y ch\u1ee7\",\"publisher\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#organization\",\"name\":\"Blog | TheGioiMayChu\",\"url\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/cropped-ntcnlog-logo-2.png\",\"contentUrl\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/cropped-ntcnlog-logo-2.png\",\"width\":500,\"height\":73,\"caption\":\"Blog | TheGioiMayChu\"},\"image\":{\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/thegioimaychu\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/#\\\/schema\\\/person\\\/777f41403962330933a4fbcc80bec570\",\"name\":\"TGMC Blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff179df3aeac078da5e07e40f2e014e99ab4120e2276b687bbe7e6964d99655e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff179df3aeac078da5e07e40f2e014e99ab4120e2276b687bbe7e6964d99655e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff179df3aeac078da5e07e40f2e014e99ab4120e2276b687bbe7e6964d99655e?s=96&d=mm&r=g\",\"caption\":\"TGMC Blog\"},\"url\":\"https:\\\/\\\/thegioimaychu.vn\\\/blog\\\/author\\\/tgmc\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0110\u1ecbnh ngh\u0129a Floating Point Precision - FP64, FP32, FP16 l\u00e0 g\u00ec? - Blog | TheGioiMayChu","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/","twitter_card":"summary_large_image","twitter_title":"\u0110\u1ecbnh ngh\u0129a Floating Point Precision - FP64, FP32, FP16 l\u00e0 g\u00ec? - Blog | TheGioiMayChu","twitter_description":"FP ho&#7863;c Floating Point Precision l&agrave; g&igrave;? Floating Point Precision (&#272;&#7897; ch&iacute;nh x&aacute;c d&#7845;u ph&#7849;y &#273;&#7897;ng) l&agrave; bi&#7875;u di&#7877;n c&#7911;a m&#7897;t s&#7889; th&ocirc;ng qua h&#7879; nh&#7883; ph&acirc;n.&nbsp;&#272;&#7875; truy&#7873;n c&aacute;c s&#7889; &#273;&#7871;n m&aacute;y t&iacute;nh c&#7911;a ch&uacute;ng ta, c&aacute;c gi&aacute; tr&#7883; ph&#7843;i &#273;&#432;&#7907;c d&#7883;ch sang c&aacute;c s&#7889; nh&#7883; ph&acirc;n 1 v&agrave; 0, trong &#273;&oacute; th&#7913; t&#7921; v&agrave;...","twitter_image":"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/TheGioiMayChu-Blog-Image-FPP.jpg","twitter_misc":{"Written by":"TGMC Blog","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/#article","isPartOf":{"@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/"},"author":{"name":"TGMC Blog","@id":"https:\/\/thegioimaychu.vn\/blog\/#\/schema\/person\/777f41403962330933a4fbcc80bec570"},"headline":"\u0110\u1ecbnh ngh\u0129a Floating Point Precision &#8211; FP64, FP32, FP16 l\u00e0 g\u00ec?","datePublished":"2024-01-15T08:08:28+00:00","mainEntityOfPage":{"@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/"},"wordCount":3000,"publisher":{"@id":"https:\/\/thegioimaychu.vn\/blog\/#organization"},"image":{"@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/#primaryimage"},"thumbnailUrl":"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/TheGioiMayChu-Blog-Image-FPP.jpg","keywords":["floating point precision","fp16","fp32","fp64"],"articleSection":["AI - HPC","T\u1ed5ng h\u1ee3p"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/","url":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/","name":"\u0110\u1ecbnh ngh\u0129a Floating Point Precision - FP64, FP32, FP16 l\u00e0 g\u00ec? - Blog | TheGioiMayChu","isPartOf":{"@id":"https:\/\/thegioimaychu.vn\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/#primaryimage"},"image":{"@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/#primaryimage"},"thumbnailUrl":"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/TheGioiMayChu-Blog-Image-FPP.jpg","datePublished":"2024-01-15T08:08:28+00:00","breadcrumb":{"@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/#primaryimage","url":"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/TheGioiMayChu-Blog-Image-FPP.jpg","contentUrl":"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2024\/01\/TheGioiMayChu-Blog-Image-FPP.jpg","width":756,"height":395},{"@type":"BreadcrumbList","@id":"https:\/\/thegioimaychu.vn\/blog\/ai-hpc\/dinh-nghia-floating-point-precision-fp64-fp32-fp16-la-gi-p18945\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Trang ch\u1ee7","item":"https:\/\/thegioimaychu.vn\/blog\/"},{"@type":"ListItem","position":2,"name":"AI - HPC","item":"https:\/\/thegioimaychu.vn\/blog\/.\/ai-hpc\/"},{"@type":"ListItem","position":3,"name":"\u0110\u1ecbnh ngh\u0129a Floating Point Precision &#8211; FP64, FP32, FP16 l\u00e0 g\u00ec?"}]},{"@type":"WebSite","@id":"https:\/\/thegioimaychu.vn\/blog\/#website","url":"https:\/\/thegioimaychu.vn\/blog\/","name":"Blog | TheGioiMayChu","description":"C\u1eadp nh\u1eadt xu h\u01b0\u1edbng c\u00f4ng ngh\u1ec7 m\u00e1y ch\u1ee7","publisher":{"@id":"https:\/\/thegioimaychu.vn\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thegioimaychu.vn\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/thegioimaychu.vn\/blog\/#organization","name":"Blog | TheGioiMayChu","url":"https:\/\/thegioimaychu.vn\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thegioimaychu.vn\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2018\/08\/cropped-ntcnlog-logo-2.png","contentUrl":"https:\/\/thegioimaychu.vn\/blog\/wp-content\/uploads\/2018\/08\/cropped-ntcnlog-logo-2.png","width":500,"height":73,"caption":"Blog | TheGioiMayChu"},"image":{"@id":"https:\/\/thegioimaychu.vn\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/thegioimaychu\/"]},{"@type":"Person","@id":"https:\/\/thegioimaychu.vn\/blog\/#\/schema\/person\/777f41403962330933a4fbcc80bec570","name":"TGMC Blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ff179df3aeac078da5e07e40f2e014e99ab4120e2276b687bbe7e6964d99655e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ff179df3aeac078da5e07e40f2e014e99ab4120e2276b687bbe7e6964d99655e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff179df3aeac078da5e07e40f2e014e99ab4120e2276b687bbe7e6964d99655e?s=96&d=mm&r=g","caption":"TGMC Blog"},"url":"https:\/\/thegioimaychu.vn\/blog\/author\/tgmc\/"}]}},"_links":{"self":[{"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/posts\/18945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/comments?post=18945"}],"version-history":[{"count":3,"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/posts\/18945\/revisions"}],"predecessor-version":[{"id":18955,"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/posts\/18945\/revisions\/18955"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/media\/18954"}],"wp:attachment":[{"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/media?parent=18945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/categories?post=18945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thegioimaychu.vn\/blog\/wp-json\/wp\/v2\/tags?post=18945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}