Skip to content

Add get include and include headers #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 28, 2020

Conversation

oleksandr-pavlyk
Copy link
Contributor

@PokhodenkoSA @diptorupd

  1. Headers are included in the layout of the package.
  2. DPPL*Interface shared libraries are moved from environment/lib to the dpctl site-package location (Thanks @Alexander-Makaryev for pointing out $ORIGIN magic variable)
  3. Introduced dpctl.get_include()
  4. Added dpctl/__init__.pxd, which allows downstream users to do cimport dpctl.

1. installation script copies backends/include/* into dpctl/
2. Use MANIFEST.in to include dpctl/include and dpctl/libDPPL*Inteface.* into
   installation layout
3. Added dpctl.get_include() function to provide location of includes
   needed to build extension linked to dpCtl
4. Provide dpctl/__init__.pxd allowing to do `cimport dptcl` to access
   relevant entities like dpctl.SyclQueue, etc.
Updated build scripts to account for move of DPPL*Interface dynamic libraries
from environment lib to site-packages/dpctl/
Copy link
Contributor

@diptorupd diptorupd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointed out a few cosmetic changes. Will defer to Sergey on how this works out inside CI.

mkdir dpctl\include
xcopy backends\include dpctl\include /E /Y



REM required by dpglue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required by _opencl_core (dpctl.ocldrv)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are touching the file, might as well fix the comment.

set "OpenCL_LIBDIR=%DPCPP_ROOT%/lib"
set "DPPL_OPENCL_INTERFACE_LIBDIR=dpctl"
set "DPPL_OPENCL_INTERFACE_INCLDIR=dpctl\include"
set "OpenCL_LIBDIR=%DPCPP_ROOT%\lib"

REM required by oneapi_interface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required by _sycl_core (dpct)

export OpenCL_LIBDIR=${DPCPP_ROOT}/lib
export DPPL_OPENCL_INTERFACE_LIBDIR=dpctl
export DPPL_OPENCL_INTERFACE_INCLDIR=dpctl/include
export OpenCL_LIBDIR=${DPCPP_ROOT}/libw
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is libw

MANIFEST.in Outdated
recursive-include dpctl/include *.h *.hpp
include dpctl/*.pxd
include dpctl/*DPPL*Interface.*
global-exclude *.cpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

@diptorupd
Copy link
Contributor

diptorupd commented Sep 26, 2020

@oleksandr-pavlyk I am getting an AssertFailure when I do conda build conda-recipe. The build_for_develop.sh script works fine.

Packaging dpctl
INFO:conda_build.build:Packaging dpctl
INFO conda_build.build:build(2222): Packaging dpctl
/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/environ.py:452: UserWarning: The environment variable 'ONEAPI_ROOT' is being passed through with value '/opt/intel/oneapi'. If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
UserWarning
Packaging dpctl-0.3.0-py36h6bb024c_5
INFO:conda_build.build:Packaging dpctl-0.3.0-py36h6bb024c_5
INFO conda_build.build:bundle_conda(1468): Packaging dpctl-0.3.0-py36h6bb024c_5
compiling .pyc files...
found egg dir: /home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.6/site-packages/dpctl-0.3.0+5.gbcf97e2-py3.6-linux-x86_64.egg
number of files: 52
WARNING :: get_rpaths_raw()=[] and patchelf=[['/home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib', '$ORIGIN']] disagree for /home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.6/site-packages/dpctl/_sycl_core.cpython-36m-x86_64-linux-gnu.so ::
WARNING :: get_rpaths_raw()=[] and patchelf=[['/home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib', '$ORIGIN']] disagree for /home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.6/site-packages/dpctl/_memory.cpython-36m-x86_64-linux-gnu.so ::
WARNING :: get_rpaths_raw()=['/home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib'] and patchelf=[['/home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib']] disagree for /home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.6/site-packages/dpctl/libDPPLOpenCLInterface.so ::
WARNING :: get_rpaths_raw()=['/home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib'] and patchelf=[['/home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib']] disagree for /home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.6/site-packages/dpctl/libDPPLSyclInterface.so ::
WARNING :: get_rpaths_raw()=['/home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib'] and patchelf=[['/home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib']] disagree for /home/diptorupd/.conda/envs/dpctl-devel2/conda-bld/dpctl_1601153736731/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.6/site-packages/dpctl/_opencl_core.abi3.so ::
Traceback (most recent call last):
File "/home/diptorupd/.conda/envs/dpctl-devel2/bin/conda-build", line 11, in
sys.exit(main())
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 474, in main
execute(sys.argv[1:])
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 465, in execute
verify=args.verify, variants=args.variants)
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/api.py", line 210, in build
notest=notest, variants=variants)
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/build.py", line 3017, in build_tree
notest=notest,
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/build.py", line 2299, in build
newly_built_packages = bundlers[pkg_type](output_d, m, env, stats)
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/build.py", line 1598, in bundle_conda
files = post_process_files(metadata, initial_files)
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/build.py", line 1444, in post_process_files
post_build(m, new_files, build_python=python)
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/post.py", line 1315, in post_build
check_overlinking(m, files, host_prefix)
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/post.py", line 1243, in check_overlinking
m.config.variant)
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/post.py", line 1058, in check_overlinking_impl
for package in packages}
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/post.py", line 1058, in
for package in packages}
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/post.py", line 601, in library_nature
dsos, run_exports, _ = determine_package_nature(pkg, prefix, subdir, bldpkgs_dirs, output_folder, channel_urls)
File "/home/diptorupd/.conda/envs/dpctl-devel2/lib/python3.6/site-packages/conda_build/post.py", line 583, in determine_package_nature
assert isinstance(channeldata, dict) or isinstance(pkg, FakeDist)
AssertionError

@PokhodenkoSA
Copy link
Contributor

@diptorupd it is known issue. Use conda-build=3.18. It does not work with newest conda-build=3.20.

@oleksandr-pavlyk
Copy link
Contributor Author

@PokhodenkoSA Were you able to build conda package with this?

@PokhodenkoSA
Copy link
Contributor

PokhodenkoSA commented Sep 28, 2020

@oleksandr-pavlyk I did not try this concrete PR but switching to conda-build=3.18 will eliminate problem described by @diptorupd. I will try to build locally.

@oleksandr-pavlyk
Copy link
Contributor Author

Trying conda build conda-recipe/ fails locally as {{ compiler('cxx')}} is being interpreted as GCC. How do you tell conda-build to build with dpcpp instead?

@diptorupd
Copy link
Contributor

@PokhodenkoSA @oleksandr-pavlyk Any ideas why CI is failing at the build stage for this PR?

@PokhodenkoSA
Copy link
Contributor

@PokhodenkoSA @oleksandr-pavlyk Any ideas why CI is failing at the build stage for this PR?

In Linux it is infrastructure problem. On Windows build and test passed - only validation checks False positive.
I think we need to restart CI.

@diptorupd
Copy link
Contributor

LGTM. Let us merge after @PokhodenkoSA restarts the Linux CI and we get a clean build on Linux.

@oleksandr-pavlyk
Copy link
Contributor Author

Was able to build locally on Linux, merging?

@oleksandr-pavlyk oleksandr-pavlyk merged commit 304931b into master Sep 28, 2020
@diptorupd diptorupd deleted the add-get-include-and-include-headers branch October 3, 2020 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants