{"id":15555589,"url":"https://github.com/loseall/tensorflow-cmake","last_synced_at":"2025-04-11T17:15:18.488Z","repository":{"id":178006314,"uuid":"145421137","full_name":"LoSealL/tensorflow-cmake","owner":"LoSealL","description":"tensorflow build by CMake","archived":false,"fork":false,"pushed_at":"2018-11-07T02:04:24.000Z","size":28807,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T13:11:17.865Z","etag":null,"topics":["cmake","tensorflow","windows"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LoSealL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-20T13:26:39.000Z","updated_at":"2020-08-04T23:52:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"66871e80-c650-40b1-8f18-e52d5124ee79","html_url":"https://github.com/LoSealL/tensorflow-cmake","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"e90afeef2ea5606efe6692d1d771b73c0b2bfa89"},"previous_names":["loseall/tensorflow-cmake"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoSealL%2Ftensorflow-cmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoSealL%2Ftensorflow-cmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoSealL%2Ftensorflow-cmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoSealL%2Ftensorflow-cmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoSealL","download_url":"https://codeload.github.com/LoSealL/tensorflow-cmake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447595,"owners_count":21105140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","tensorflow","windows"],"created_at":"2024-10-02T15:09:49.730Z","updated_at":"2025-04-11T17:15:13.479Z","avatar_url":"https://github.com/LoSealL.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"### NOTICE\nThe original tensorflow [readme](./README_TF.md).\n\n### TensorFlow CMake for Windows\nBecause beyond tensorflow `r1.11`, tensorflow officially drop CMake build files, and support only bazel, so I personally try to maintain a cmake build scripts for tensorflow.\n\n### Environment\nThe following lists prerequisite softwares and libraries:\n- [python3](https://www.python.org/) (v3.6 in *Anaconda* is recommended)\n- [cmake](https://cmake.org/download/) \u003e= 3.12\n- [git](https://git-scm.com/download/win)\n- cuda == 9.0\n- cudnn == 7.0\n\nThe following lists prerequisite pip packages:\n- absl-py \u003e= 0.2.2\n- protobuf \u003e= 3.6.0\n- numpy**\n- six\n- setuptools\n- wheel\n\nCompilers (tested by me):\n- VS 2015 (vc14), or\n- VS 2017 (vc15)***\n\n*Swig is pre-downloaded into `./_build`\n\n**You should the same version of numpy in __BUILD__ and __USE__\n\n***When you use the newest VS 2017, CUDA compile check may fail, to resolve this, see [here](https://github.com/LoSealL/tensorflow-cmake/wiki/Resolve-CUDA-compile-check-error-in-CMAKE)\n\n### How to compile\n\nStart into VS x64 prompt.\n\n====================\n\n```bash\n\u003e mkdir _build \u0026\u0026 cd _build\n\u003e cmake .. -A x64 -T host=x64 ^\n  -DCMAKE_BUILD_TYPE=Release ^\n  -DPYTHON_EXECUTABLE=%PYTHON_EXECUTABLE% ^\n  -DPYTHON_LIBRARIES=%PYTHON_LIB% ^\n  -Dtensorflow_ENABLE_GPU=\u003cON/OFF\u003e ^\n  -Dtensorflow_BUILD_SHARED_LIB=\u003cON/OFF\u003e ^\n  -Dtensorflow_WIN_CPU_SIMD_OPTIONS=/arch:AVX2 ^\n  -Dtensorflow_ENABLE_MKL_SUPPORT=\u003cON/OFF\u003e ^\n  -Dtensorflow_ENABLE_MKLDNN_SUPPORT=\u003cON/OFF\u003e ^\n  -Dtensorflow_BUILD_PYTHON_BINDINGS=\u003cON/OFF\u003e ^\n  -Dtensorflow_DISABLE_EIGEN_FORCEINLINE=\u003cON/OFF\u003e ^\n  -Dtensorflow_ENABLE_GRPC_SUPPORT=ON ^\n  -Dtensorflow_ENABLE_SSL_SUPPORT=\u003cON/OFF\u003e ^\n  -Dtensorflow_ENABLE_SNAPPY_SUPPORT=\u003cON/OFF\u003e\n\u003e cmake --build . --config Release --target tf_python_build_pip_package\n```\n\nNote: `^` is another line, GRPC must set `ON`, `WIN_CPU_SIMD_OPTIONS` can set to `OFF` if you don't know what's AVX. `PYTHON_EXECUTABLE` and `PYTHON_LIB` should specify to your own path.(Path to python.exe and python36.lib for instance)\n\n\n\nOR your can try experimentally script `make.bat` to auto search required path\n\n```bash\n\u003e make \u0026\u0026 cd _build\n\u003e cmake --build . --config Release --target tf_python_build_pip_package\n```\n\nBefore doing this, your must edit `make.bat` and your own options (such as GPU or MKL)\n\n\n\n### File Re-organized\n\nThe original cmake files are all in the `./tensorflow/contrib/cmake`, it's better to add `CMakeLists.txt` to each sub-folders\n\n-----\n\nTHANKS TO ALL THE CONTRIBUTORS TO CMAKE SCRIPTS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floseall%2Ftensorflow-cmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floseall%2Ftensorflow-cmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floseall%2Ftensorflow-cmake/lists"}