Skip to content
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

support deps analyze for cu file #432

Merged
merged 5 commits into from Jun 3, 2019

Conversation

@OpportunityLiu
Copy link
Contributor

commented Jun 2, 2019

No description provided.

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 2, 2019

这套是不是应该拿到某个公共的地方,gcc也要用

@waruqi

This comment has been minimized.

Copy link
Member

commented Jun 2, 2019

嗯 多处共用的处理逻辑 可以抽离出来,放到 modules/private/tools/gcc/ 目录下

private目录下是专门用来放置一些私有模块的,内部使用,不对外开放

@OpportunityLiu OpportunityLiu changed the base branch from dev to master Jun 2, 2019

@OpportunityLiu OpportunityLiu changed the base branch from master to dev Jun 2, 2019

xmake/modules/core/tools/gcc.lua Outdated Show resolved Hide resolved

@OpportunityLiu OpportunityLiu force-pushed the OpportunityLiu:cu-deps branch from da8b65e to 27c5f41 Jun 2, 2019

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 2, 2019

刚才翻了下历史文档发现 -MF 是 cuda 10.1 才加的。。。

@waruqi

This comment has been minimized.

Copy link
Member

commented Jun 2, 2019

windows上现在这样也支持么?

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 2, 2019

就是在win上试的,linux上还没试呢

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

在liunx上测试了一下

使用 CUDA 9.2 时候提示 flags 没有,生成的依赖和以前一样只有本文件
使用 CUDA 10.1 生成依赖里面多了3个文件 config.h locale.h allicator.h

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

我觉得的是你的split有问题
https://xmake.io/#/zh/manual?keyword=vprint&id=string-split
这个文档说的是 "%s+" 从空白分割,其实是从空白和+分割,结果路径里带加号的全隔开了

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

图片

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

图片

@waruqi waruqi referenced this pull request Jun 3, 2019
@waruqi

This comment has been minimized.

Copy link
Member

commented Jun 3, 2019

我觉得的是你的split有问题
https://xmake.io/#/zh/manual?keyword=vprint&id=string-split
这个文档说的是 "%s+" 从空白分割,其实是从空白和+分割,结果路径里带加号的全隔开了

嗯,这个是有点问题,我开了个issues 跟进下,回头我统一修复下。。#436

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

需要一个 path.normalize 的方法,发现path库里也有很多问题。

path.absolute("/") 居然会返回 "C:\Users\lzy\Documents\Source\OpportunityLiu\PowerFlow\新建文件夹" ...
path.absolute("c:a") 却返回 "c:a"

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

而现在一切都表现的很正常,我甚至不敢改

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

如果不算这些的话,这个 PR 相关的内容已经没啥问题了,可以合并

@OpportunityLiu

This comment has been minimized.

@waruqi

This comment has been minimized.

Copy link
Member

commented Jun 3, 2019

需要一个 path.normalize 的方法,发现path库里也有很多问题。

path.absolute("/") 居然会返回 "C:\Users\lzy\Documents\Source\OpportunityLiu\PowerFlow\新建文件夹" ...

这个正常,我需要兼容处理unix的路径,有时候windows上设置 一些 unix 风格的路径,例如在 cygwin中,我需要转换成 windows正常可访问的路径

path.absolute("c:a") 却返回 "c:a"

win下的路径规范,我目前仅处理最基础的风格,有些不常见的写法,我暂时没去做处理,至少到目前为止,现在这样够用了。

@waruqi

This comment has been minimized.

Copy link
Member

commented Jun 3, 2019

如果不算这些的话,这个 PR 相关的内容已经没啥问题了,可以合并

最近时间不多,等回头有时间了 我细看下。

@waruqi

This comment has been minimized.

Copy link
Member

commented Jun 3, 2019

https://blogs.msdn.microsoft.com/jeremykuhne/2016/04/21/path-normalization/

目前 path.translate 接口就是 类似 path.normalize ,只是处理win path没有这个link里面的说的各种case那么完善,但也基本够用了,等之后遇到 必须处理的 其他case的时候,我再完善下好了。

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

目前 path.translate 接口就是 类似 path.normalize ,只是处理win path没有这个link里面的说的各种case那么完善,但也基本够用了,等之后遇到 必须处理的 其他case的时候,我再完善下好了。

貌似并不会处理 /../ /./ 之类的东西,depsfile里全是这种

@waruqi

This comment has been minimized.

Copy link
Member

commented Jun 3, 2019

目前 path.translate 接口就是 类似 path.normalize ,只是处理win path没有这个link里面的说的各种case那么完善,但也基本够用了,等之后遇到 必须处理的 其他case的时候,我再完善下好了。

貌似并不会处理 /../ /./ 之类的东西,depsfile里全是这种

///\\ => / 这种还是会做去重处理的

@OpportunityLiu

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

///\\ => / 这种还是会做去重处理的

对,两个反斜杠开始的UNC全被干掉了。。。

@waruqi waruqi merged commit 02b0287 into xmake-io:dev Jun 3, 2019

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@waruqi waruqi added this to the v2.2.7 milestone Jun 3, 2019

@waruqi waruqi added the improvement label Jun 3, 2019

@OpportunityLiu OpportunityLiu deleted the OpportunityLiu:cu-deps branch Jun 3, 2019

@waruqi

This comment has been minimized.

Copy link
Member

commented Jun 4, 2019

dev分支上,string.split 我重构过了,兼容之前模式的基础上做了些增强改进,增加对字串的模式匹配,以及plain text匹配来提速,详情见:#436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.