Skip to content

Rendering toolkit embree code sample PR #710

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

Conversation

MichaelRoyceCarroll
Copy link
Contributor

Adding a New Sample(s)

Description

New sample PR for oneapi rendering toolkit embree sample. (library #2 of 4)
See #697

Checklist

Administrative

  • Review sample design with the appropriate Domain Expert:
  • If you have any new dependencies/binaries, inform the oneAPI Code Samples Project Manager: @JoeOster

Code Development

Security and Legal

  • OSPDT Approval (see @JoeOster for assistance)
  • Compile using the following compiler flags and fix any warnings, the falgs are: "/Wall -Wformat-security -Werror=format-security"
  • Bandit Scans (Python only)
  • Virus scan

Review

  • Review DPC++ code with Paul Peterseon. (GitHub User: pmpeter1)
  • Review readme with Tom Lenth(@tomlenth) and/or Joe Oster(@JoeOster)
  • Tested using Dev Cloud when applicable

JoeOster and others added 18 commits September 29, 2021 09:45
* Update Makefile

* Update Makefile

* Update Makefile

* Update DCT.hpp

* Update intrin_ftz_sample.cpp

* Update merge_sort.cpp

* Update intrin_double_sample.cpp

* Update intrin_dot_sample.cpp

* Update DCT.cpp
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
…ed commit)

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Moving README.md content to individual folders
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
…get stuck. It is not too big.

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Copy link
Contributor

@praveenkk123 praveenkk123 left a comment

Choose a reason for hiding this comment

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

Approve for CI purposes only

@praveenkk123
Copy link
Contributor

Hi Michael,
I see that you submitted to master branch. Can you please submit to the development branch. Please do the same for other three PRs too

Thanks
Praveen

@JoeOster JoeOster linked an issue Oct 18, 2021 that may be closed by this pull request
@MichaelRoyceCarroll MichaelRoyceCarroll changed the base branch from master to development October 18, 2021 23:40
# NOT LIMITED TO ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
# PURPOSE, NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS.
#
# =============================================================
CC = icc
Copy link
Contributor

Choose a reason for hiding this comment

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

Three of the 4 PR's recently entered show the license header being removed. Once we start merging these, conflicts will probably start appearing. The License headers should only be removed in one PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Joe thanks for the feedback... I think I may have some issues because my fork was from master and the merge request is to devel? I'm not sure why/how this file could be touched. Can you provide any suggestions around this... Should I merge devel into my local branch and push again?

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DirectProgramming/ content should not be touched as part of any diff I create

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JoeOster @praveenkk123 I believe I was able to align all 4 PR branches with the upstream development branch. Hopefully this one is no longer an issue. The tag now says outdated.

@@ -0,0 +1,28 @@
//==============================================================
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this tpp file unique to this project or is it from another source? If unique, remove the license header from the file, if not what project is it from? include url

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Joe... thanks... I think this is in the same bucket of issues related to devel.

I think I may have some issues because my fork was from master and the merge request is to devel? I'm not sure why/how this file could be touched. Can you provide any suggestions around this... Should I merge devel into my local branch and push again?

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Libraries/ content should not be touched as part of any diff I create

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Michael, yes there are some conflicts in your PRs. Please fetch the latest from development branch , update your code and submit to the development branch again. I see lots of conflicting files that are not relavant to your project

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JoeOster @praveenkk123 I believe I was able to align all 4 PR branches with the upstream development branch. Hopefully this one is no longer an issue. The tag now says outdated.

@@ -0,0 +1,79 @@
# Getting Started Sample for Intel oneAPI Rendering Toolkit: Intel Embree
Copy link
Contributor

Choose a reason for hiding this comment

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

This readme, needs to follow the oneAPI format for readme's. See the mandlebrot readme as an example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

README.md's have been update for this PR and all 4x PRs to better match mandlebrot.

@JoeOster
Copy link
Contributor

OSPDT Approved per OSPDT-1015 * All Apache Licensed libraries distributed as part of oneAPI have been approved

  • Embree is part of the oneAPI Rendering Toolkit

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
…json

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
…een removed

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Copy link
Contributor

@praveenkk123 praveenkk123 left a comment

Choose a reason for hiding this comment

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

Approve for CI purposes only

…I and public build

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Copy link
Contributor

@praveenkk123 praveenkk123 left a comment

Choose a reason for hiding this comment

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

Approve for CI

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Copy link
Contributor

@praveenkk123 praveenkk123 left a comment

Choose a reason for hiding this comment

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

Approve for CI

Copy link
Contributor

@praveenkk123 praveenkk123 left a comment

Choose a reason for hiding this comment

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

Approve for CI

@MichaelRoyceCarroll
Copy link
Contributor Author

@Yury-B Same question here as in PR #713... is CMake available? If not, can it be available?

@MichaelRoyceCarroll
Copy link
Contributor Author

@Yury-B Do you have any recommendations on env variables for oneAPI and rpath? Are they being sourced for this build? Any speculation would be appreciated... I forsee a lot of trial and error here to find a good solution.

If @rpath will search DYLD_LIBRARY_PATH, and DYLD_LIBRARY_PATH is set via oneAPI environment variables... I'm scratching my head trying to follow why this lib isn't loading... I think there are a few options to "hard code" to rpath... but I don't think we want that... We want @rpath to resolve from source /opt/intel/oneapi/setvars.sh env vars (DYLD_LIBRARY_PATH).

Ref: https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling

It almost makes me think oneapi env vars are not available in this environment.

I should make the ONEAPI_ROOT message more robust with an indicator "dynamically determined" or "default strings" which I have included. Maybe we push on the rpath at build time iff env vars are not detected...

It's possible libembree3.3.dylib is built incorrectly or built to allow client programs to resolve through DYLD_LIBRARY_PATH. There are pluses and minuses to both approaches with tbb. I'm going to try some experiments and run it by Rudy.

-MichaelC

@MichaelRoyceCarroll
Copy link
Contributor Author

@Yury-B Same question here as in PR #713... is CMake available? If not, can it be available?

This looks like it was resolved.

@Yury-B
Copy link

Yury-B commented Oct 28, 2021

If @rpath will search DYLD_LIBRARY_PATH, and DYLD_LIBRARY_PATH is set via oneAPI environment variables... I'm scratching my head trying to follow why this lib isn't loading... I think there are a few options to "hard code" to rpath... but I don't think we want that... We want @rpath to resolve from source /opt/intel/oneapi/setvars.sh env vars (DYLD_LIBRARY_PATH).

you can't rely on DYLD_LIBRARY_PATH, because of
https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html

@MichaelRoyceCarroll
Copy link
Contributor Author

MichaelRoyceCarroll commented Oct 28, 2021

If @rpath will search DYLD_LIBRARY_PATH, and DYLD_LIBRARY_PATH is set via oneAPI environment variables... I'm scratching my head trying to follow why this lib isn't loading... I think there are a few options to "hard code" to rpath... but I don't think we want that... We want @rpath to resolve from source /opt/intel/oneapi/setvars.sh env vars (DYLD_LIBRARY_PATH).

you can't rely on DYLD_LIBRARY_PATH, because of https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html

@Yury-B Thanks I'm glad I asked this is really insightful. Is the implication that the env DYLD_LIBRARY_PATH purge occurs here due to the CI wrapper? This makes me want to bake paths for CI sample.json steps after build using otool/install_name_tool Ref: https://medium.com/@donblas/fun-with-rpath-otool-and-install-name-tool-e3e41ae86172

Or maybe I should just call the env script again in the sample.json test steps?

-MichaelC

@Yury-B
Copy link

Yury-B commented Oct 28, 2021

Or maybe I should just call the env script again in the sample.json test steps?

why don't you check compiler implementation?
e.g. /oneAPI-samples/DirectProgramming/C++/GraphTraversal/MergesortOMP
see makefile and json config.
i think common look and feel is ok for samples.

@MichaelRoyceCarroll
Copy link
Contributor Author

Or maybe I should just call the env script again in the sample.json test steps?

why don't you check compiler implementation? e.g. /oneAPI-samples/DirectProgramming/C++/GraphTraversal/MergesortOMP see makefile and json config. i think common look and feel is ok for samples.

I updated it to be similar for this PR... Can we check it again?

@praveenkk123 praveenkk123 requested a review from pmpeter1 October 28, 2021 23:13
@Yury-B
Copy link

Yury-B commented Oct 29, 2021

excellent, now it's green!

Copy link
Contributor

@praveenkk123 praveenkk123 left a comment

Choose a reason for hiding this comment

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

Approve for CI

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>
Copy link
Contributor

@praveenkk123 praveenkk123 left a comment

Choose a reason for hiding this comment

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

Approve for CI

@praveenkk123 praveenkk123 merged commit eb52d7e into oneapi-src:development Nov 4, 2021
praveenkk123 pushed a commit that referenced this pull request Dec 7, 2021
* ONSAM-1414 Broken Link in Headers (#685)

* Update Makefile

* Update Makefile

* Update Makefile

* Update DCT.hpp

* Update intrin_ftz_sample.cpp

* Update merge_sort.cpp

* Update intrin_double_sample.cpp

* Update intrin_dot_sample.cpp

* Update DCT.cpp

* fix deprecation notice (#682)

* initial commit for RenderingToolkit GSG sample proposal

* signed inital commit for RenderingToolkit GSG intro samples

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Added generated GUIDS to .repo-tools/Docs_Automation/guids.json (signed commit)

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Update README.md

Moving README.md content to individual folders

* Order samples folders

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Update README.md

* Adding per sample component README.md files

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Update README.md

* Adding percomponent LICENSE placeholder files (to be reviewed)

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Adding converted .pfm input file. This file could help users if they get stuck. It is not too big.

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Updating sample.json files per Joseph Oster guidance

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Updates to oidn README.md for linux and macos

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Update README for library requirements

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* New branch for just embree sample

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Add description to base README.md

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* removing overlapping content. overlap to RenderingToolkit-ospray branch

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Updates for embree README.md

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Updates for the embree README.md (editorial)

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* clang-format for source

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Escape extra quotes for CI and get the correct minimal.exe in sample.json

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Should be no Release folder for sample.json on macos or lin. It has been removed

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Escape for accurate exe invoke

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Updates for CMakeLists.txt and sample.json to be more adaptable for CI and public build

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Update some errors in embree README.md

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Moving file heirarchy to RenderingToolkit/GettingStarted

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* CMakeLists change for variable consistency

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

* Update sample.json

* Update sample.json for DYLD_LIBRARY_PATH CI workaround

* CMakeLists health updates

Signed-off-by: Michael R Carroll <michael.carroll@alumni.usc.edu>

Co-authored-by: JoeOster <52936608+JoeOster@users.noreply.github.com>
Co-authored-by: ericlars <eric.larson@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request to Add a oneAPI Sample: Initial Rendering Toolkit sample
7 participants