From 04e9a24705a8661f880f23f99b4c3c1523724877 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Wed, 4 Nov 2020 20:58:05 +0000 Subject: [PATCH] Uplaoded python package to pypi --- MANIFEST.in | 6 ++++++ README.md | 38 +++++++++++++++++++------------------- setup.py | 13 +++++++++---- 3 files changed, 34 insertions(+), 23 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..e9f375e39 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +include CMakeLists.txt +recursive-include src * +recursive-include python * +recursive-include single_include * +recursive-include external * + diff --git a/README.md b/README.md index b745ccfbf..ad50bb4d0 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,25 @@ static std::string shaderData = "path/to/shader.glsl"; static std::string shaderData = "path/to/shader.glsl.spv"; ``` +## More examples + +### Simple examples + +* [Pass shader as raw string](https://kompute.cc/overview/advanced-examples.html#simple-shader-example) +* [Record batch commands with a Kompute Sequence](https://kompute.cc/overview/advanced-examples.html#record-batch-commands) +* [Run Asynchronous Operations](https://kompute.cc/overview/advanced-examples.html#asynchronous-operations) +* [Run Parallel Operations Across Multiple GPU Queues](https://kompute.cc/overview/advanced-examples.html#parallel-operations) +* [Create your custom Kompute Operations](https://kompute.cc/overview/advanced-examples.html#your-custom-kompute-operation) +* [Implementing logistic regression from scratch](https://kompute.cc/overview/advanced-examples.html#logistic-regression-example) + +### End-to-end examples + +* [Machine Learning Logistic Regression Implementation](https://towardsdatascience.com/machine-learning-and-data-processing-in-the-gpu-with-vulkan-kompute-c9350e5e5d3a) +* [Parallelizing GPU-intensive Workloads via Multi-Queue Operations](https://towardsdatascience.com/parallelizing-heavy-gpu-workloads-via-multi-queue-operations-50a38b15a1dc) +* [Android NDK Mobile Kompute ML Application](https://towardsdatascience.com/gpu-accelerated-machine-learning-in-your-mobile-applications-using-the-android-ndk-vulkan-kompute-1e9da37b7617) +* [Game Development Kompute ML in Godot Engine](https://towardsdatascience.com/supercharging-game-development-with-gpu-accelerated-ml-using-vulkan-kompute-the-godot-game-engine-4e75a84ea9f0) + + ## Architectural Overview The core architecture of Kompute includes the following: @@ -329,25 +348,6 @@ assert tensor_out.data() == [2.0, 4.0, 6.0] For further details you can read the [Python Package documentation](https://kompute.cc/overview/python-package.html) or the [Python Class Reference documentation](https://kompute.cc/overview/python-reference.html). -## More examples - -### Simple examples - -* [Pass shader as raw string](https://kompute.cc/overview/advanced-examples.html#simple-shader-example) -* [Record batch commands with a Kompute Sequence](https://kompute.cc/overview/advanced-examples.html#record-batch-commands) -* [Run Asynchronous Operations](https://kompute.cc/overview/advanced-examples.html#asynchronous-operations) -* [Run Parallel Operations Across Multiple GPU Queues](https://kompute.cc/overview/advanced-examples.html#parallel-operations) -* [Create your custom Kompute Operations](https://kompute.cc/overview/advanced-examples.html#your-custom-kompute-operation) -* [Implementing logistic regression from scratch](https://kompute.cc/overview/advanced-examples.html#logistic-regression-example) - -### End-to-end examples - -* [Machine Learning Logistic Regression Implementation](https://towardsdatascience.com/machine-learning-and-data-processing-in-the-gpu-with-vulkan-kompute-c9350e5e5d3a) -* [Parallelizing GPU-intensive Workloads via Multi-Queue Operations](https://towardsdatascience.com/parallelizing-heavy-gpu-workloads-via-multi-queue-operations-50a38b15a1dc) -* [Android NDK Mobile Kompute ML Application](https://towardsdatascience.com/gpu-accelerated-machine-learning-in-your-mobile-applications-using-the-android-ndk-vulkan-kompute-1e9da37b7617) -* [Game Development Kompute ML in Godot Engine](https://towardsdatascience.com/supercharging-game-development-with-gpu-accelerated-ml-using-vulkan-kompute-the-godot-game-engine-4e75a84ea9f0) - - ## Build Overview The build system provided uses `cmake`, which allows for cross platform builds. diff --git a/setup.py b/setup.py index 120ea82f6..eac6985ad 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,9 @@ from setuptools import setup, Extension from setuptools.command.build_ext import build_ext from distutils.version import LooseVersion +curr_dir = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(curr_dir, 'README.md'), encoding='utf-8') as f: + long_description = f.read() class CMakeExtension(Extension): def __init__(self, name, sourcedir=''): @@ -46,13 +49,13 @@ class CMakeBuild(build_ext): build_args = ['--config', cfg] if platform.system() == "Windows": - cmake_args += ['-DKOMPUTE_EXTRA_CXX_FLAGS="-DSPDLOG_ACTIVE_LEVEL=0"'] + cmake_args += ['-DKOMPUTE_EXTRA_CXX_FLAGS=""'] cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)] if sys.maxsize > 2**32: cmake_args += ['-A', 'x64'] build_args += ['--', '/m'] else: - cmake_args += ['-DKOMPUTE_EXTRA_CXX_FLAGS="-fPIC -DSPDLOG_ACTIVE_LEVEL=0"'] + cmake_args += ['-DKOMPUTE_EXTRA_CXX_FLAGS="-fPIC"'] cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] build_args += ['--', '-j2'] @@ -67,11 +70,13 @@ class CMakeBuild(build_ext): setup( name='kp', - version='0.0.1', + version='0.4.1', author='Alejandro Saucedo', description='Vulkan Kompute: Blazing fast, mobile-enabled, asynchronous, and optimized for advanced GPU processing usecases.', - long_description='', + long_description=long_description, + long_description_content_type='text/markdown', ext_modules=[CMakeExtension('kp')], cmdclass=dict(build_ext=CMakeBuild), zip_safe=False, + include_package_data=True, )